from typing import Sequence
from typing import List


def flatten_sequence(
    sequence: Sequence,
) -> List:

    """Given a sequence, returns a flat version of it. For instance,
    flatten_sequence([0,1,2,[3,[4,5]]]) = [0,1,2,3,4,5].
    """
    #if isinstance(sequence,Iterable):
    if isinstance(sequence, list) or isinstance(sequence, tuple) :
        return [a for i in sequence for a in flatten_sequence(i)]
    else:
        return [sequence]