'Returns the number of splitting iterations in the cross-validator
Parameters
X : object, optional
Always ignored, exists for compatibility.
y : object, optional
Always ignored, exists for compatibility.
groups : array-like, with shape (n_samples,), optional
Group labels for the samples used while splitting the dataset into
train/test set. This \'groups\' parameter must always be specified to
calculate the number of splits, though the other parameters can be
omitted.
Returns
n_splits : int
Returns the number of splitting iterations in the cross-validator.'

def get_n_splits(self, X=None, y=None, groups=None):

    if (groups is None):
        raise ValueError("The    'groups'    parameter    should    not    be    None.")
    groups = check_array(groups, ensure_2d=False, dtype=None)
    return len(np.unique(groups))
