docstr: Given an op name and its alias, put the translation function (callable)
  into the registry.
docstr_tok: ["Given","an","op","name","and","its","alias",",","put","the","translation","function","(","callable",")","into","the","registry","."]
code: def register_func(self, func=None, torch_alias=None, override=False):
      """
      Given an op name and its alias, put the translation function (callable)
      into the registry.
      """
      f_name = func.__name__
      all_f_names = [f_name]
      if torch_alias is not None:
          all_f_names.extend(torch_alias)
  
      for name in all_f_names:
          if name.endswith("_"):
              raise Exception(
                  f'Attempting to register "{name}" op. Do not register inplace ops. (inplace torch ops'
                  f' end in a "_"). Instead register the normal op version: "{name[:-1]}". The inplace'
                  f" version will be supported automatically."
              )
          if not override and name in self.name_to_func_mapping:
              raise ValueError(f"Torch op {name} already registered.")
          self.set_func_by_name(func, name)
  
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 3 for calling the TorchOpsRegistry obj's underlying member method code with example usage: obj.register_func(func, torch_alias, override) without return types