code: def get_prims():
      op_schema_pairs = []
      for op_name in prims.__all__:
          op_overload = getattr(prims, op_name, None)
  
          if not isinstance(op_overload, torch._ops.OpOverload):
              continue
  
          op_overloadpacket = op_overload.overloadpacket
  
          op_name = str(op_overload).replace(".default", "")
          schema = op_overloadpacket.schema.replace("*", r"\*")
  
          op_schema_pairs.append((op_name, schema))
  
      return op_schema_pairs
  
file_path: pytorch/docs/source/scripts/build_opsets.py
imports: import os
  from collections import OrderedDict
  from pathlib import Path
  import torch
  import torch._prims
  from torchgen.gen import parse_native_yaml
label_desc: Use image node_id 2 for calling a global function with example usage: get_prims() and returns: op_schema_pairs