def _check_range(name, label, min_label, max_label):
    if label < min_label or label > max_label:
        raise ValueError("Expected %s label to be between %d "
                         "and %d inclusive, , but got %s" %
                         (name, min_label, max_label, str(label)))
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/new_norb.py/_check_range/original