code: def infer_schema(prototype_function: typing.Callable) -> str:
      sig = inspect.signature(prototype_function)
  
      def error_fn(what):
          raise ValueError(
              f"custom_op(...)(func): {what} "
              f"Got func with signature {sig})"
          )
  
      params = [
          parse_param(name, param, error_fn)
          for name, param in sig.parameters.items()
      ]
      ret = parse_return(sig.return_annotation, error_fn)
      return f"({', '.join(params)}) -> {ret}"
  
imports: import dataclasses
  import functools
  import inspect
  import sys
  import typing
  import weakref
  from torchgen.model import FunctionSchema, OperatorName, SchemaKind, BaseType, ListType, BaseTy
  import torch
  import torch._C
  import torch.library
  from torch._library.abstract_impl import AbstractImplCtx
  from torch.library import get_ctx
  from .autograd import autograd_kernel_indirection, construct_autograd_kernel
label_desc: Use image node_id 9 for calling a global function with example usage: infer_schema(prototype_function) and returns: str, str, str, ret