code: def test_model_has_gradients(self, input_shape, layer_cls, *args):
      algorithm = self.get_algorithm()
      model = tf.keras.Sequential([layer_cls(*args, use_bias=True)])
      inputs = tf.random.normal(input_shape)
      model(inputs)
      training_model = algorithm.get_training_model(model)
      with tf.GradientTape(persistent=True) as tape:
          tape.watch(inputs)
          outputs = training_model(inputs)
          loss = tf.reduce_sum(abs(outputs)) + tf.reduce_sum(
              training_model.losses
          )
      self.assertIsNotNone(tape.gradient(loss, inputs))
      gradients = tape.gradient(loss, training_model.trainable_weights)
      self.assertAllEqual(
          [g is not None for g in gradients],
          [
              w.dtype.is_floating
              for w in training_model.trainable_weights
          ],
      )
  
imports: import os
  import shutil
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_model_optimization.python.core.common.keras.compression.algorithms import epr
label_desc: Use image node_id 5 for calling the EPRTest obj's underlying member method code with example usage: obj.test_model_has_gradients(input_shape, layer_cls) without return types