def make_type_var_value(tv: TypeVar, ctx: Context) -> TypeVarValue:
    if (tv.__bound__ is not None):
        bound = _type_from_runtime(tv.__bound__, ctx)
    else:
        bound = None
    if tv.__constraints__:
        constraints = tuple((_type_from_runtime(constraint, ctx) for constraint in tv.__constraints__))
    else:
        constraints = ()
    return TypeVarValue(tv, bound=bound, constraints=constraints)
def make_type_var_value(tv: TypeVar, ctx: Context) -> TypeVarValue:
    if (tv.__bound__ is not None):
        bound = _type_from_runtime(tv.__bound__, ctx)
    else:
        bound = None
    if tv.__constraints__:
        constraints = tuple((_type_from_runtime(constraint, ctx) for constraint in tv.__constraints__))
    else:
        constraints = ()
    return TypeVarValue(tv, bound=bound, constraints=constraints)