code: def _register_coreml_op(op_name):
      """Register a function to check the given operator is supported by Core ML.
  
      Paramters
      ---------
      op_name : Str
          The name of operator that will be registered.
  
      """
  
      def _check_supported(expr):
          attrs, args = expr.attrs, expr.args
          if op_name == "nn.conv2d":
              if not isinstance(args[1], Constant):
                  return False
              if attrs["kernel_layout"] not in ["HWIO", "OIHW"]:
                  return False
          return True
  
      tvm.ir.register_op_attr(
          op_name, "target.coremlcompiler", _check_supported
      )
  
imports: import tvm.ir
  from tvm.contrib.target.coreml import _convert_map
  from ...expr import Constant
label_desc: Use image node_id 1 for calling a global function with example usage: _register_coreml_op(op_name) and returns: True, False, False