class_docstr: Tests correctness of the softclip transformation.
class_docstr_tok: ["Tests","correctness","of","the","softclip","transformation","."]
code: def test_is_nearly_identity_within_range(self, low, high):
      xs = tf.convert_to_tensor(
          np.linspace(-3.0, 3.0, 20), dtype=self.dtype
      )
      if low is not None:
          low = tf.convert_to_tensor(low, self.dtype)
      if high is not None:
          high = tf.convert_to_tensor(high, self.dtype)
      b = soft_clip.SoftClip(low, high, hinge_softness=0.01)
      ys = self.evaluate(b.forward(xs))
      self.assertAllClose(ys, xs)
      xs_inverted = self.evaluate(b.inverse(ys))
      self.assertAllClose(ys, xs_inverted)
  
file_path: probability/tensorflow_probability/python/bijectors/soft_clip_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import soft_clip
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the _SoftClipBijectorBase obj's underlying member method code with example usage: obj.test_is_nearly_identity_within_range(low, high) without return types