def collapse_oel(lst):
    """ Collapse a one-element list to a single var

    :param filename: (:code:`list`) with one element to collapse
    :returns: (:code:`Any`) the single element
    """
    if type(lst) != list:
        raise ValueError('Not a list')
    if len(lst) != 1:
        raise ValueError('List has multiple elements')
    return lst[0]
