def METHOD_NAME(evecs, Cnorm, k, in_bound_idxs=None):
    X = evecs[:, :k] / (Cnorm[:, k - 1:k] + 1e-5)
    KM = sklearn.METHOD_NAME.KMeans(n_clusters=k, n_init=50, max_iter=500)
    seg_ids = KM.fit_predict(X)
    ###############################################################
    # Locate segment boundaries from the label sequence
    if in_bound_idxs is None:
        bound_beats = 1 + np.flatnonzero(seg_ids[:-1] != seg_ids[1:])
        # Count beats 0 as a boundary
        bound_idxs = librosa.util.fix_frames(bound_beats, x_min=0)
    else:
        bound_idxs = in_bound_idxs
    # Compute the segment label for each boundary
    bound_segs = list(seg_ids[bound_idxs])
    # Tack on the end-time
    bound_idxs = list(np.append(bound_idxs, len(Cnorm) - 1))
    return bound_idxs, bound_segs