code: def _set_torch_reg_op(op_type, op_func):
      _TORCH_OPS_REG.set_func_by_name(op_func, op_type)
  
file_path: coremltools/coremltools/converters/mil/frontend/torch/test/test_custom_ops.py
imports: import pytest
  import torch
  import torch.nn
  from coremltools.converters.mil.frontend.torch.ops import _get_inputs
  from coremltools.converters.mil.frontend.torch.ops import cosine_similarity
  from coremltools.converters.mil.frontend.torch.torch_op_registry import _TORCH_OPS_REGISTRY
  from coremltools.converters.mil.frontend.torch.torch_op_registry import register_torch_op
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Operation, types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from .testing_utils import TorchBaseTest, convert_to_mlmodel
label_desc: Use image node_id 2 for calling a global function with example usage: _set_torch_reg_op(op_type, op_func) without return types