code: def test_perturb_and_apply_gradient_soft_round(self):
      f = round_ops.soft_round
      x = tf.linspace(-2.0, 2.0, 200)
      temperature = 7.0
      with tf.GradientTape(persistent=True) as g:
          g.watch(x)
          y = math_ops.perturb_and_apply(
              f, x, temperature, expected_grads=True
          )[0]
      dx = g.gradient(y, x)
      self.assertAllClose(dx, tf.ones_like(dx))
  
file_path: compression/tensorflow_compression/python/ops/math_ops_test.py
imports: from absl.testing import parameterized
  import scipy.stats
  import tensorflow
  from tensorflow_compression.python.ops import math_ops
  from tensorflow_compression.python.ops import round_ops
label_desc: Use image node_id 2 for calling the PerturbAndApplyTest obj's underlying member method code with example usage: obj.test_perturb_and_apply_gradient_soft_round() without return types