code: def register_torch_op(_func=None, torch_alias=None, override=False):
      """
      Registration routine for PyTorch operators
      _func: (PyTorch conversion function) [Default=None]
          PyTorch conversion function to register
  
      torch_alias: (List of string) [Default=None]
          All other PyTorch operators that should also be mapped to
          current conversion routine.
          e.g. Sort aliased with SortV1, SortV2
          All provided alias operators must not be registered previously.
  
          "In place" alias are looked up automatically and do not need to
          be registered. PyTorch uses an underscore suffix to denote the
          in place version, e.g. "sum_" is the in place version of "sum".
  
      override: (Boolean) [Default=False]
          If True, overrides earlier registration i.e. specified
          operator and alias will start pointing to current conversion
          function.
          Otherwise, duplicate registration will error out.
      """
  
      def func_wrapper(func):
          _TORCH_OPS_REGISTRY.register_func(func, torch_alias, override)
          return func
  
      if _func is None:
          # decorator called without argument
          return func_wrapper
      return func_wrapper(_func)
  
file_path: coremltools/coremltools/converters/mil/frontend/torch/torch_op_registry.py
imports: from typing import Callable, List
  import torch
  from coremltools import _logger
  from coremltools.models._deprecation import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: register_torch_op(_func, torch_alias, override) and returns: func_wrapper, func, func_wrapper