class_docstr: Input graph:
                                  Const
                                    |
                                    V
  input -----> convolution -----> add/sub  ----> relu ---> out
  
  Output graph:
  input -----> convolution -----> relu ----> out
code: def test_fuse_bias_conv(
      self,
      conv_dim,
      flip_add_input_order,
      add_batch_dim_to_const,
      use_sub_instead,
      prebuilt_bias,
      scalar_elementwise,
      use_conv_transpose,
  ):
      if flip_add_input_order and use_sub_instead:
          return
  
      if use_conv_transpose and conv_dim != 2:
          return
  
      input_shape = None
      W = None
      Cout = 8
      Cin = 3
      D = 10
      const = (
          np.random.rand(Cout)
          if add_batch_dim_to_const
          else np.random.rand(1, Cout)
      )
      const = np.expand_dims(const, axis=-1)
  
      if conv_dim == 1:
          input_shape = (1, Cin, D)
          W = np.random.rand(Cout, Cin, 1)
      elif conv_dim == 2:
          input_shape = (1, Cin, D, D)
          W = np.random.rand(Cout, Cin, 1, 1)
          const = np.expand_dims(const, axis=-1)
      elif conv_dim == 3:
          input_shape = (1, Cin, D, D, D)
          W = np.random.rand(Cout, Cin, 1, 1, 1)
          const = np.expand_dims(const, axis=-1)
          const = np.expand_dims(const, axis=-1)
  
      output_shape = list(input_shape)
      output_shape[1] = Cout
  
      if scalar_elementwise:
          const = np.random.uniform(0)
  
      @mb.program(input_specs=[mb.TensorSpec(shape=input_shape)])
      def prog(x):
          kwargs = {
              "x": x,
              "weight": W,
              "pad_type": "valid",
              "dilations": [1] * conv_dim,
              "strides": [1] * conv_dim,
          }
          if prebuilt_bias:
              kwargs["bias"] = np.random.rand(Cout)
  
          x = (
              mb.conv_transpose(**kwargs)
              if use_conv_transpose
              else mb.conv(**kwargs)
          )
  
          if use_sub_instead:
              x = mb.sub(x=x, y=const)
          else:
              x = mb.add(
                  x=const if flip_add_input_order else x,
                  y=x if flip_add_input_order else const,
              )
          x = mb.relu(x=x)
          return x
  
      element_op = "sub" if use_sub_instead else "add"
      conv_op = "conv" if not use_conv_transpose else "conv_transpose"
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "common::fuse_bias_conv"
      )
      assert get_op_types_in_program(prev_prog) == [
          conv_op,
          element_op,
          "relu",
      ]
      assert get_op_types_in_program(prog) == [conv_op, "relu"]
  
      old_bias = prev_block.find_ops(op_type=conv_op)[0].inputs.get(
          "bias", None
      )
      old_bias_val = 0 if old_bias is None else old_bias.val
      assert old_bias_val is not None
      assert (
          block.find_ops(op_type=conv_op)[0].inputs["bias"] is not None
      )
      new_bias_val = (
          block.find_ops(op_type=conv_op)[0].inputs["bias"].val
      )
      assert new_bias_val is not None
      if use_sub_instead:
          np.testing.assert_almost_equal(
              old_bias_val - np.squeeze(const), new_bias_val
          )
      else:
          np.testing.assert_almost_equal(
              old_bias_val + np.squeeze(const), new_bias_val
          )
  
      assert_model_is_valid(
          prog,
          {"x": input_shape},
          expected_output_shapes={
              block.outputs[0].name: tuple(output_shape)
          },
      )
  
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.testing_utils import assert_op_count_match, assert_model_is_valid, get_op_types_in_program, apply_pass_and_basic_check
  import pytest
  import numpy
  import itertools
label_desc: Use image node_id 1 for calling the TestElementwiseOptimizationPasses obj's underlying member method code with example usage: obj.test_fuse_bias_conv(conv_dim, flip_add_input_order, add_batch_dim_to_const, use_sub_instead, prebuilt_bias, scalar_elementwise, use_conv_transpose) and returns: x