def get_last_origin(tp):
if NEW_TYPING:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>sentinel = object()<EOL>origin = getattr(tp, '<STR_LIT>', sentinel)<EOL>if origin is sentinel:<EOL><INDENT>return None<EOL><DEDENT>if origin is None:<EOL><INDENT>return tp<EOL><DEDENT>return origin<EOL>
Get the last base of (multiply) subscripted type. Supports generic types,
    Union, Callable, and Tuple. Returns None for unsupported types.
    Examples::

        get_last_origin(int) == None
        get_last_origin(ClassVar[int]) == None
        get_last_origin(Generic[T]) == Generic
        get_last_origin(Union[T, int][str]) == Union[T, int]
        get_last_origin(List[Tuple[T, T]][int]) == List[Tuple[T, T]]
        get_last_origin(List) == List