def to_tuple(param, low=None, bias=None):
if low is not None and bias is not None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if param is None:<EOL><INDENT>return param<EOL><DEDENT>if isinstance(param, (int, float)):<EOL><INDENT>if low is None:<EOL><INDENT>param = - param, + param<EOL><DEDENT>else:<EOL><INDENT>param = (low, param) if low < param else (param, low)<EOL><DEDENT><DEDENT>elif isinstance(param, (list, tuple)):<EOL><INDENT>param = tuple(param)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if bias is not None:<EOL><INDENT>return tuple([bias + x for x in param])<EOL><DEDENT>return tuple(param)<EOL>
Convert input argument to min-max tuple
    Args:
        param (scalar, tuple or list of 2+ elements): Input value.
            If value is scalar, return value would be (offset - value, offset + value).
            If value is tuple, return value would be value + offset (broadcasted).
        low:  Second element of tuple can be passed as optional argument
        bias: An offset factor added to each element