code: def is_op_fused(func, op_name):
      is_fused = False
  
      def visit(op):
          if (
              isinstance(op, tvm.relay.function.Function)
              and op_name in op.attrs["PartitionedFromPattern"]
          ):
              nonlocal is_fused
              is_fused = True
  
      tvm.relay.analysis.post_order_visit(func.body, visit)
      return is_fused
  
file_path: tvm/tests/python/contrib/test_bnns/test_conv2d_patterns.py
imports: import tvm
  from tvm import relay
  import numpy
  from tvm.relay.op.contrib.bnns import partition_for_bnns
label_desc: Use image node_id 2 for calling a global function with example usage: is_op_fused(func, op_name) and returns: is_fused