code: def test_add_pass(self):
      @mb.program(input_specs=[mb.TensorSpec(shape=(2, 3))])
      def prog(x):
          x = mb.relu(x=x)
          x = mb.relu(x=x)
          x = mb.add(x=x, y=1.0)
          return x
  
      assert get_op_types_in_program(prog) == ["relu", "relu", "add"]
      pipeline = PassPipeline.EMPTY
      pipeline.append_pass("common::merge_consecutive_relus")
      assert pipeline.passes == ["common::merge_consecutive_relus"]
      PassPipelineManager.apply_pipeline(prog, pipeline)
      assert get_op_types_in_program(prog) == ["relu", "add"]
  
      inputs = {"x": (2, 3)}
      assert_model_is_valid(
          prog,
          inputs,
          expected_output_shapes={
              prog.functions["main"].outputs[0].name: (2, 3)
          },
      )
  
file_path: coremltools/coremltools/converters/mil/mil/passes/tests/test_pass_pipeline.py
imports: import numpy
  import pytest
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.passes.pass_pipeline import PassPipeline, PassPipelineManager
  from coremltools.converters.mil.testing_utils import assert_model_is_valid, get_op_types_in_program
label_desc: Use image node_id 1 for calling the TestPassPipeline obj's underlying member method code with example usage: obj.test_add_pass() and returns: x