@classmethod
    def to_callable(cls, obj):
        if not isinstance(obj, (list, tuple)):
            raise TypeError('RangeProcessor argument must be a tuple/list '
                            'or a callable, not {}'.format(obj))
        if not len(obj) in (1, 2, 3):
            raise TypeError('RangeProcessor argument must be a tuple/list '
                            'with 1, 2 or 3 elements ([low,] high[, step]) '
                            'not {}'.format(len(obj)))

        if len(obj) == 1:
            return check_range_and_coerce_step(0, *obj)
        return check_range_and_coerce_step(*obj)
dataset/ETHPy150Open LabPy/lantz/lantz/processors.py/RangeProcessor.to_callable/original