code: def _torchscript_type_to_python_type(
      ts_type: "torch._C.JitType",
  ) -> Any:
      """
      Convert a TorchScript type to a Python type (including subtypes) via
      eval'ing the annotation_str. _type_eval_globals sets up expressions
      like "List" and "Future" to map to actual types (typing.List and jit.Future)
      """
      return eval(ts_type.annotation_str, _type_eval_globals)
  
imports: import torch
  import inspect
  import numbers
  import types
  import typing
  import enum
  import warnings
  from typing import Any, Callable, Dict, List, Optional, Tuple, NamedTuple, cast, TYPE_CHECKING
  from torch._jit_internal import boolean_dispatched
  from ._compatibility import compatibility
  from torch._ops import OpOverloadPacket, OpOverload
label_desc: Use image node_id 2 for calling a global function with example usage: _torchscript_type_to_python_type(ts_type) and returns: eval