def METHOD_NAME(instance: Instance) -> dict[TypeVarId, Type]:
    """Given an Instance, produce the resulting type environment for type
    variables bound by the Instance's class definition.
    An Instance is a type application of a class (a TypeInfo) to its
    required number of type arguments.  So this environment consists
    of the class's type variables mapped to the Instance's actual
    arguments.  The type variables are mapped by their `id`.
    """
    return {binder.id: arg for binder, arg in zip(instance.type.defn.type_vars, instance.args)}