def flatten(obj, can_return_single: bool=False):
    """
    Flattens nested lists, like so;

    >>> from tyrian.utils import flatten
    >>> flatten([[[[[[['value']]]]]]], can_return_single=True)
    'value'

    >>> flatten([[[[[[['value']]]]]]], can_return_single=False)
    ['value']

    :param obj: nested list of lists, depth uncertain
    :param can_return_single: see above
    """

    if type(obj) == list and len(obj) == 1 and type(obj[0]) == list:
        return flatten(obj[0], can_return_single)
    elif type(obj) == list and len(obj) == 1 and can_return_single:
        return obj[0]
    else:
        return obj