def __val_convert(self, val): 
converted = (<NUM_LIT:0>, <NUM_LIT:0>) <EOL>if isinstance(val, range) and <NUM_LIT:0> <= val.start < val.stop and val.step == <NUM_LIT:1>:<EOL><INDENT>converted = (val.start, val.stop)<EOL><DEDENT>elif (isinstance(val, tuple) or isinstance(val, list)) and <NUM_LIT:0> <= val[<NUM_LIT:0>] < val[<NUM_LIT:1>] and len(val) == <NUM_LIT:2>:<EOL><INDENT>converted = val<EOL><DEDENT>elif isinstance(val, int):<EOL><INDENT>converted = (val, val+<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return converted<EOL>
Convert input data to a range tuple (start, end).

Parameters
----------
val : int or tuple or list or range
    Two element indexed object, that represents a range, or integer.

Returns
-------
converted : tuple
    Tuple that represents a range.