code: def testDegenerateSplines(self):
      bijector = rational_quadratic_spline.RationalQuadraticSpline(
          [], [], 1, validate_args=True
      )
      xs = np.linspace(-2, 2, 20, dtype=np.float32)
      self.assertAllClose(xs, self.evaluate(bijector.forward(xs)))
      self.assertAllClose(
          0,
          self.evaluate(
              bijector.forward_log_det_jacobian(xs, event_ndims=1)
          ),
      )
      self.assertAllClose(
          np.zeros_like(xs),
          self.evaluate(
              bijector.forward_log_det_jacobian(xs, event_ndims=0)
          ),
      )
  
      bijector = rational_quadratic_spline.RationalQuadraticSpline(
          [2.0], [2.0], [], validate_args=True
      )
      xs = np.linspace(-2, 2, 20, dtype=np.float32)
      self.assertAllClose(xs, self.evaluate(bijector.forward(xs)))
      self.assertAllClose(
          0,
          self.evaluate(
              bijector.forward_log_det_jacobian(xs, event_ndims=1)
          ),
      )
      self.assertAllClose(
          np.zeros_like(xs),
          self.evaluate(
              bijector.forward_log_det_jacobian(xs, event_ndims=0)
          ),
      )
  
imports: import functools
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import hypothesis_testlib
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import rational_quadratic_spline
  from tensorflow_probability.python.bijectors import real_nvp
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 2 for calling the RationalQuadraticSplineTest obj's underlying member method code with example usage: obj.testDegenerateSplines() without return types