def METHOD_NAME(self, X, y=None):
    rng = self.random_state
    n_splits = self.n_splits
    y = np.asarray(y)
    if y.ndim > 1:
        msg = 'Target data has more than one dimension. Must be single vector of continuous values.'
        raise NotImplementedError(msg)
    n_samples = y.shape[0]
    self.n_samples = n_samples
    sort_indices = np.argsort(y)
    min_test_samples_per_fold = int(np.ceil(n_samples / n_splits))
    test_folds = [[] for _ in range(n_splits)]
    current = 0
    for i in range(min_test_samples_per_fold):
        start, stop = current, current + n_splits
        if i+1 < min_test_samples_per_fold:
            subset = sort_indices[start:stop]
        else:
            subset = sort_indices[start:]
        if self.shuffle:
            check_random_state(rng).shuffle(subset)
        for k in range(len(subset)):
            test_folds[k].append(subset[k])
        current = stop
    return test_folds