def get_parameters(tp):
if NEW_TYPING:<EOL><INDENT>if (isinstance(tp, _GenericAlias) or<EOL>isinstance(tp, type) and issubclass(tp, Generic) and<EOL>tp is not Generic):<EOL><INDENT>return tp.__parameters__<EOL><DEDENT>return ()<EOL><DEDENT>if (<EOL>is_generic_type(tp) or is_union_type(tp) or<EOL>is_callable_type(tp) or is_tuple_type(tp)<EOL>):<EOL><INDENT>return tp.__parameters__ if tp.__parameters__ is not None else ()<EOL><DEDENT>return ()<EOL>
Return type parameters of a parameterizable type as a tuple
    in lexicographic order. Parameterizable types are generic types,
    unions, tuple types and callable types. Examples::

        get_parameters(int) == ()
        get_parameters(Generic) == ()
        get_parameters(Union) == ()
        get_parameters(List[int]) == ()

        get_parameters(Generic[T]) == (T,)
        get_parameters(Tuple[List[T], List[S_co]]) == (T, S_co)
        get_parameters(Union[S_co, Tuple[T, T]][int, U]) == (U,)
        get_parameters(Mapping[T, Tuple[S_co, T]]) == (T, S_co)