def ensure_tuple_or_list(obj):
    'Given an object, wrap into a tuple if not list or tuple\n    '
    if isinstance(obj, (list, tuple)):
        return obj
    return (obj,)
Given an object, wrap into a tuple if not list or tuple
def ensure_tuple_or_list(obj):
    '\n    '
    if isinstance(obj, (list, tuple)):
        return obj
    return (obj,)