code: def testLayerMetadataPassedAndReplacedInTransforms(self, model_type):
      class ReplaceLayerMetadata(Transform):
          def pattern(self):
              return LayerPattern("Dense")
  
          def replacement(self, match_layer):
              if match_layer.metadata["key"] == "Hello":
                  match_layer.metadata["key"] = "World"
              return match_layer
  
      model = self._simple_dense_model(model_type)
  
      dense_layer = self._get_layer(model, 0, model_type)
      relu_layer = self._get_layer(model, 1, model_type)
  
      layer_metadata = {
          dense_layer.name: {"key": "Hello"},
          relu_layer.name: {"key": "Hello"},
      }
  
      expected_metadata = {
          dense_layer.name: {"key": "World"},
          relu_layer.name: {"key": "Hello"},
      }
  
      transformer = ModelTransformer(
          model, [ReplaceLayerMetadata()], None, layer_metadata
      )
      transformed_model, updated_metadata = transformer.transform()
  
      self.assertEqual(expected_metadata, updated_metadata)
  
      # 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(),
          ["build_input_shape"],
      )
  
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 27 for calling the ModelTransformerTest obj's underlying member method code with example usage: obj.testLayerMetadataPassedAndReplacedInTransforms(model_type) and returns: LayerPattern, match_layer