code: def all_trainable_layers_are_registered(
      input_model: tf.keras.Model, layer_registry: lr.LayerRegistry
  ) -> bool:
      """Check if an input model's trainable layers are all registered.
  
      Args:
        input_model: The Keras model from which to obtain the layers from.
        layer_registry: A `LayerRegistry` instance containing functions that help
          compute gradient norms quickly. See
          `tensorflow_privacy.privacy.fast_gradient_clipping.layer_registry` for
          more details.
  
      Returns:
        True if all the trainable layers in `input_model` are in `layer_registry`.
        False otherwise.
      """
      for layer in input_model.layers:
          if (
              not layer_registry.is_elem(layer)
              and layer.trainable_variables
          ):
              return False
      return True
  
file_path: privacy/tensorflow_privacy/privacy/fast_gradient_clipping/gradient_clipping_utils.py
imports: from collections.abc import Sequence, Set
  from typing import Any, Literal, Optional
  from absl import logging
  import tensorflow
  from tensorflow_privacy.privacy.fast_gradient_clipping import layer_registry
  from tensorflow_privacy.privacy.fast_gradient_clipping import type_aliases
label_desc: Use image node_id 3 for calling a global function with example usage: all_trainable_layers_are_registered(input_model, layer_registry) and returns: True, False