def get_origin(tp):
if NEW_TYPING:<EOL><INDENT>if isinstance(tp, _GenericAlias):<EOL><INDENT>return tp.__origin__ if tp.__origin__ is not ClassVar else None<EOL><DEDENT>if tp is Generic:<EOL><INDENT>return Generic<EOL><DEDENT>return None<EOL><DEDENT>if isinstance(tp, GenericMeta):<EOL><INDENT>return _gorg(tp)<EOL><DEDENT>if is_union_type(tp):<EOL><INDENT>return Union<EOL><DEDENT>return None<EOL>
Get the unsubscripted version of a type. Supports generic types, Union,
    Callable, and Tuple. Returns None for unsupported types. Examples::

        get_origin(int) == None
        get_origin(ClassVar[int]) == None
        get_origin(Generic) == Generic
        get_origin(Generic[T]) == Generic
        get_origin(Union[T, int]) == Union
        get_origin(List[Tuple[T, T]][int]) == list  # List prior to Python 3.7