code: def _match_pattern(op):
      pow_op, sqrt_op = None, None
  
      # check the current op is pow(2) or sqrt
      if op.op_type == "pow" and op.y.val == 2:
          pow_op = op
      if op.op_type == "sqrt":
          sqrt_op = op
  
      # check the children of the current op
      child_ops = op.outputs[0].child_ops
  
      # if the op output is a block output or there is more than one child, fast fail
      if (
          op.outputs[0] in op.enclosing_block.outputs
          or len(child_ops) != 1
      ):
          return None
  
      # if we have pow(2), check for sqrt
      if pow_op and child_ops[0].op_type == "sqrt":
          sqrt_op = child_ops[0]
      # if we have sqrt, check for pow(2)
      elif (
          sqrt_op
          and child_ops[0].op_type == "pow"
          and child_ops[0].y.val == 2
      ):
          pow_op = child_ops[0]
  
      # if we don't have both ops, fast fail
      if not pow_op or not sqrt_op:
          return None
  
      # check that the two ops are connected
      if (
          pow_op.outputs[0].name != sqrt_op.x.name
          and sqrt_op.outputs[0].name != pow_op.x.name
      ):
          return None
  
      # return the other op
      return pow_op if pow_op != op else sqrt_op
  
file_path: coremltools/coremltools/converters/mil/backend/mil/passes/fuse_pow2_sqrt.py
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.helper import block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
label_desc: Use image node_id 1 for calling a global function with example usage: _match_pattern(op) and returns: unknown, None, None, None