def __typing_subst__(self, arg):
        msg = "Parameters to generic types must be types."
        arg = _type_check(arg, msg, is_argument=True)
        if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or
            (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))):
            raise TypeError(f"{arg} is not valid as type argument")
        return arg
class TypeVarTuple(_Final, _Immutable, _PickleUsingNameMixin, _root=True):
    """Type variable tuple.
    Usage:
      Ts = TypeVarTuple('Ts')  # Can be given any name
    Just as a TypeVar (type variable) is a placeholder for a single type,
    a TypeVarTuple is a placeholder for an *arbitrary* number of types. For
    example, if we define a generic class using a TypeVarTuple:
      class C(Generic[*Ts]): ...
    Then we can parameterize that class with an arbitrary number of type
    arguments:
      C[int]       # Fine
      C[int, str]  # Also fine
      C[()]        # Even this is fine
    For more details, see PEP 646.
    Note that only TypeVarTuples defined in global scope can be pickled.
    """
    def __init__(self, name):
        self.__name__ = name
        # Used for pickling.
        def_mod = _caller()
        if def_mod != 'typing':
            self.__module__ = def_mod
    def __iter__(self):
        yield Unpack[self]
    def __repr__(self):
        return self.__name__
    def __typing_subst__(self, arg):