class_docstr: Matches patterns to apply transforms in a tf.keras model graph.
docstr: Replace the tree or chain of match_layer_node with replacement_layer_node.
code: def _replace(self, match_layer_node, replacement_layer_node):
      """Replace the tree or chain of match_layer_node with replacement_layer_node."""
      if self._is_functional_model(self.model):
          self._replace_functional(
              match_layer_node, replacement_layer_node
          )
      else:
          self._replace_sequential(
              match_layer_node, replacement_layer_node
          )
  
imports: import collections
  import copy
  import re
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras.graph_transformations import transforms
label_desc: Use image node_id 21 for calling the ModelTransformer obj's underlying member method code with example usage: obj._replace(match_layer_node, replacement_layer_node) without return types