code: def test_pattern_conv2d_with_bias_add():
      for axis in (1, 2):
          a = relay.var("a", shape=(2, 7, 8, 8), dtype=fp32)
          w = relay.const(
              np.random.uniform(-10, 10, (8, 7, 3, 3)).astype(fp32)
          )
          res = relay.nn.conv2d(
              a,
              w,
              kernel_size=(3, 3),
              padding=(1, 1),
              channels=8,
              out_dtype=fp32,
          )
          b = relay.const(np.random.uniform(-10, 10, 8).astype(fp32))
          res = relay.nn.bias_add(res, b, axis=axis)
  
          mod = partition(res)
          bias_is_fused = is_op_fused(
              mod["tvmgen_default_bnns_main_0"], "nn.bias_add"
          )
  
          assert bias_is_fused if axis == 1 else not bias_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 3 for calling a global function with example usage: test_pattern_conv2d_with_bias_add() without return types