code: def signature(
      f: NativeFunction, *, method: bool = False, pyi: bool = False
  ) -> PythonSignature:
      return signature_from_schema(
          f.func,
          category_override=f.category_override,
          method=method,
          pyi=pyi,
      )
  
imports: from dataclasses import dataclass
  from typing import Dict, List, Optional, Sequence, Set, Tuple, Union
  from torchgen.api import cpp
  from torchgen.api.types import Binding, CppSignature, CppSignatureGroup
  from torchgen.gen import pythonify_default
  from torchgen.model import Argument, BaseTy, BaseType, FunctionSchema, ListType, NativeFunction, OptionalType, Return, Type, Variant
label_desc: Use image node_id 6 for calling a global function with example usage: signature(f) and returns: signature_from_schema