def check_number_of_labels(n_labels, n_samples):
    if (not (1 < n_labels < n_samples)):
        raise ValueError(('Number of labels is %d. Valid values are 2 to n_samples - 1 (inclusive)' % n_labels))
def check_number_of_labels(n_labels, n_samples):
    if (not (1 < n_labels < n_samples)):
        raise ValueError(('Number of labels is %d. Valid values are 2 to n_samples - 1 (inclusive)' % n_labels))