code: def test_gradients_are_straight_through(self):
      em = self.get_model()
      x = tf.range(-20.0, 20.0)
      x_perturbed = x + tf.random.uniform(x.shape, -0.49, 0.49)
      with tf.GradientTape() as tape:
          tape.watch(x_perturbed)
          x_quantized = em.quantize(x_perturbed)
      gradients = tape.gradient(x_quantized, x_perturbed)
      self.assertAllEqual(gradients, tf.ones_like(gradients))
  
imports: from absl.testing import parameterized
  import tensorflow
  import tensorflow_probability
  from tensorflow_compression.python.distributions import uniform_noise
  from tensorflow_compression.python.entropy_models import continuous_indexed
label_desc: Use image node_id 8 for calling the ContinuousIndexedEntropyModelTest obj's underlying member method code with example usage: obj.test_gradients_are_straight_through() without return types