docstr: Some passes exist in different pipelines. For example, const_elimination is in both main
  and backend pipelines. If the user want to skip the const_elimination pass, we want to make
  sure both pipelines skip that pass.
docstr_tok: ["Some","passes","exist","in","different","pipelines",".","For","example",",","const_elimination","is","in","both","main","and","backend","pipelines",".","If","the","user","want","to","skip","the","const_elimination","pass",",","we","want","to","make","sure","both","pipelines","skip","that","pass","."]
code: def test_skip_passes_in_different_pipelines(self):
      """
      Some passes exist in different pipelines. For example, const_elimination is in both main
      and backend pipelines. If the user want to skip the const_elimination pass, we want to make
      sure both pipelines skip that pass.
      """
      model = self._get_test_model()
      example_input = torch.rand(1, 1, 28, 28)
      traced_model = torch.jit.trace(model, example_input)
  
      pipeline = ct.PassPipeline()
      pipeline.remove_passes(passes_names=["common::const_elimination"])
      model_converted = ct.convert(
          traced_model,
          inputs=[ct.TensorType(shape=example_input.shape)],
          convert_to="mlprogram",
          pass_pipeline=pipeline,
      )
      assert (
          get_op_types_in_program(
              model_converted._get_mil_internal(), skip_const_ops=False
          ).count("const")
          == 24
      )
  
imports: import copy
  import os
  import tempfile
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TORCH
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.mil import Function, Program, get_new_symbol
  from coremltools.converters.mil.testing_utils import get_op_types_in_program
label_desc: Use image node_id 5 for calling the TestGraphPassManagement obj's underlying member method code with example usage: obj.test_skip_passes_in_different_pipelines() without return types