class_docstr: Input graph:
                                  Const
                                    |
                                    V
  input -----> convolution -----> add/sub  ----> relu ---> out
  
  Output graph:
  input -----> convolution -----> relu ----> out
code: def test_mul_add_fusion_to_batchnorm(
      self,
      flip_mul_input_order,
      flip_add_input_order,
      rank_3_const_input,
  ):
      C = 3
      gamma = np.random.rand(1, C, 1, 1)
      beta = np.random.rand(1, C, 1, 1)
      if rank_3_const_input:
          gamma = np.squeeze(gamma, axis=0)
          beta = np.squeeze(beta, axis=0)
  
      @mb.program(input_specs=[mb.TensorSpec(shape=(1, 10, 10, C))])
      def prog(x):
          x = mb.transpose(x=x, perm=[0, 3, 1, 2])
          if flip_mul_input_order:
              x = mb.mul(x=gamma, y=x)
          else:
              x = mb.mul(x=x, y=gamma)
          if flip_add_input_order:
              x = mb.add(x=beta, y=x)
          else:
              x = mb.add(x=x, y=beta)
          return x
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "common::fuse_elementwise_to_batchnorm"
      )
      assert get_op_types_in_program(prev_prog) == [
          "transpose",
          "mul",
          "add",
      ]
      assert get_op_types_in_program(prog) == [
          "transpose",
          "batch_norm",
      ]
      assert_model_is_valid(
          prog,
          {"x": (1, 10, 10, C)},
          expected_output_shapes={
              block.outputs[0].name: (1, C, 10, 10)
          },
      )
  
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 2 for calling the TestElementwiseOptimizationPasses obj's underlying member method code with example usage: obj.test_mul_add_fusion_to_batchnorm(flip_mul_input_order, flip_add_input_order, rank_3_const_input) and returns: x