def flatten_list(a_list, parent_list=None):
    """Given a list/tuple as entry point, return a flattened list version.
    EG:
        >>> flatten_list([1, 2, [3, 4]])
        [1, 2, 3, 4]

    NB: The kwargs are only for internal use of the function and should not be
    used by the caller.
    """

    if parent_list is None:
        parent_list = []

    for element in a_list:
        if isinstance(element, list):
            flatten_list(element, parent_list=parent_list)
        elif isinstance(element, tuple):
            flatten_list(element, parent_list=parent_list)
        else:
            parent_list.append(element)

    return parent_list