def METHOD_NAME(tp: Any, globalns: Any, localns: Any) -> Any:
    if isinstance(tp, GenericAlias):
        args = tuple(
            ForwardRef(arg) if isinstance(arg, str) else arg for arg in tp.__args__
        )
        tp = tp.__origin__[args]  # type: ignore
    return __eval_type(tp, globalns, localns)