def get_first_or_list(from_result):
    """ Return the first element, if there's only one, otherwise returns the whole list """
    return from_result[0] if (type(from_result) == list and len(from_result) == 1) else from_result