code: def testReplaceSingleLayerWithSingleLayer_MultipleOccurrences(
      self, model_type
  ):
      # Note that the functional and sequential model architectures
      # are different. The first is a tree and the second is a chain.
      if model_type == "functional":
          inp = keras.layers.Input((3,))
          x1 = keras.layers.Dense(2)(inp)
          x2 = keras.layers.Dense(2)(inp)
          out1 = keras.layers.ReLU(6.0)(x1)
          out2 = keras.layers.ReLU(6.0)(x2)
          model = keras.Model(inp, [out1, out2])
      else:
          model = keras.Sequential(
              [
                  keras.layers.Dense(2, input_shape=(3,)),
                  keras.layers.Dense(2),
                  keras.layers.ReLU(6.0),
              ]
          )
  
      transformed_model, _ = ModelTransformer(
          model, [self.ReplaceDenseLayer()]
      ).transform()
  
      # build_input_shape is a TensorShape object and the two objects are not
      # considered the same even though the shapes are the same.
      self._assert_config(
          model.get_config(),
          transformed_model.get_config(),
          [
              "class_name",
              "build_input_shape",
              "module",
              "registered_name",
          ],
      )
  
      self.assertEqual(
          "MyDense",
          self._get_layer(
              transformed_model, 0, model_type
          ).__class__.__name__,
      )
      self.assertEqual(
          "MyDense",
          self._get_layer(
              transformed_model, 1, model_type
          ).__class__.__name__,
      )
  
      self._assert_model_results_equal(model, transformed_model)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import utils
  from tensorflow_model_optimization.python.core.quantization.keras.graph_transformations import model_transformer
  from tensorflow_model_optimization.python.core.quantization.keras.graph_transformations import transforms
label_desc: Use image node_id 9 for calling the ModelTransformerTest obj's underlying member method code with example usage: obj.testReplaceSingleLayerWithSingleLayer_MultipleOccurrences(model_type) without return types