from typing import get_origin
from typing import Union
from typing import get_args


def get_possible_types(t):
    """
    Given a type or a Union of types, returns a list of the actual types
    """
    if get_origin(t) == Union:
        return get_args(t)
    else:
        return [t]