class_docstr: Matches patterns to apply transforms in a tf.keras model graph.
docstr: Return leaf layers from this sub-graph tree.
code: def _get_leaf_layers(self, match_layer):
      """Return leaf layers from this sub-graph tree."""
  
      if not match_layer.input_layers:
          return [match_layer.layer]
  
      # If 2 different layers point to the same input, or if a layer uses the
      # same input multiple times, the input layer can be repeated. But it
      # preserves a bit of structure.
  
      leaf_layers = []
      for inp in match_layer.input_layers:
          leaf_layers.extend(self._get_leaf_layers(inp))
  
      return leaf_layers
  
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 18 for calling the ModelTransformer obj's underlying member method code with example usage: obj._get_leaf_layers(match_layer) and returns: leaf_layers, list