import typing


def _get_args(annotation: typing.Any) -> typing.Tuple:
    """
    https://docs.python.org/3.9/library/stdtypes.html?highlight=__origin__#genericalias.__args__

    This attribute is a tuple (possibly of length 1) of generic types passed to the
    original __class_getitem__() of the generic class:
    >>> dict[str, list[int]].__args__
    (<class 'str'>, list[int])
    """
    return getattr(annotation, "__args__", tuple())