# Exercise scaffold. Reference implementation is in a separate directory."""G15: group-disjoint splits, training-only scaling, and bounded Lloyd clustering."""importmathimportrandomdefsplit_groups(groups,seed=21):raiseNotImplementedError('Implement this contract from the book.')defmatrix(X):raiseNotImplementedError('Implement this contract from the book.')deffit_scaler(X):raiseNotImplementedError('Implement this contract from the book.')deftransform(X,scaler):raiseNotImplementedError('Implement this contract from the book.')defkmeans(X,initial,steps=50):raiseNotImplementedError('Implement this contract from the book.')deffixture(seed=21,n_groups=30):raiseNotImplementedError('Implement this contract from the book.')