code: def _torchscript_schema_to_signature(
      ts_schema: torch._C.FunctionSchema,
  ) -> inspect.Signature:
      # Cached as it's called in the hot path of FakeTensor dispatch
      cache_key = ts_schema.name, ts_schema.overload_name
      cache_val = _SCHEMA_TO_SIGNATURE_CACHE.get(cache_key)
      if cache_val is not None:
          return cache_val
  
      res = _torchscript_schema_to_signature_impl(ts_schema)
      _SCHEMA_TO_SIGNATURE_CACHE[cache_key] = res
      return res
  
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 4 for calling a global function with example usage: _torchscript_schema_to_signature(ts_schema) and returns: res, cache_val