code: def register_custom_op_symbolic(
      symbolic_name: str,
      symbolic_fn: Callable,
      opset_version: int,
  ):
      """Registers a symbolic function for a custom operator.
  
      When the user registers symbolic for custom/contrib ops,
      it is highly recommended to add shape inference for that operator via setType API,
      otherwise the exported graph may have incorrect shape inference in some extreme cases.
      An example of setType is `test_aten_embedding_2` in `test_operators.py`.
  
      See "Custom Operators" in the module documentation for an example usage.
  
      Args:
          symbolic_name (str): The name of the custom operator in "<domain>::<op>"
              format.
          symbolic_fn (Callable): A function that takes in the ONNX graph and
              the input arguments to the current operator, and returns new
              operator nodes to add to the graph.
          opset_version (int): The ONNX opset version in which to register.
      """
      if symbolic_name.startswith("::"):
          symbolic_name = f"aten{symbolic_name}"
  
      _verify_custom_op_name(symbolic_name)
  
      registration.custom_onnx_symbolic(
          symbolic_name,
          opset_version,
          decorate=[
              _symbolic_context_handler,
          ],
      )(symbolic_fn)
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import inspect
  import io
  import re
  import textwrap
  import typing
  import warnings
  from typing import Any, Callable, cast, Collection, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Type, Union
  import torch
  import torch._C._onnx
  import torch.jit._trace
  import torch.serialization
  from torch import _C
  from torch.onnx import _constants, _exporter_states, errors, symbolic_caffe2, symbolic_helper
  from torch.onnx._globals import GLOBALS
  from torch.onnx._internal import _beartype, diagnostics, jit_utils, onnx_proto_utils, registration
label_desc: Use image node_id 45 for calling a global function with example usage: register_custom_op_symbolic(symbolic_name, symbolic_fn, opset_version) without return types