code: def testDocExample(self):
      nsplits = 3
  
      class SplineParams(tf.Module):
          def __init__(self, nbins=32):
              self._nbins = nbins
              self._built = False
              self._bin_widths = None
              self._bin_heights = None
              self._knot_slopes = None
  
          def __call__(self, x, nunits):
              if not self._built:
  
                  def _bin_positions(x):
                      out_shape = ps.concat(
                          (ps.shape(x)[:-1], (nunits, self._nbins)), 0
                      )
                      x = tf.reshape(x, out_shape)
                      return (
                          tf.math.softmax(x, axis=-1)
                          * (2 - self._nbins * 1e-2)
                          + 1e-2
                      )
  
                  def _slopes(x):
                      out_shape = tf.concat(
                          (ps.shape(x)[:-1], (nunits, self._nbins - 1)),
                          0,
                      )
                      x = tf.reshape(x, out_shape)
                      return tf.math.softplus(x) + 1e-2
  
                  self._bin_widths = tf_keras.layers.Dense(
                      nunits * self._nbins,
                      activation=_bin_positions,
                      name="w",
                  )
                  self._bin_heights = tf_keras.layers.Dense(
                      nunits * self._nbins,
                      activation=_bin_positions,
                      name="h",
                  )
                  self._knot_slopes = tf_keras.layers.Dense(
                      nunits * (self._nbins - 1),
                      activation=_slopes,
                      name="s",
                  )
                  self._built = True
  
              return rational_quadratic_spline.RationalQuadraticSpline(
                  bin_widths=self._bin_widths(x),
                  bin_heights=self._bin_heights(x),
                  knot_slopes=self._knot_slopes(x),
              )
  
      xs = np.random.randn(3, 15).astype(
          np.float32
      )  # Keras won't Dense(.)(vec).
      splines = [SplineParams() for _ in range(nsplits)]
  
      def spline_flow():
          stack = identity.Identity()
          for i in range(nsplits):
              stack = real_nvp.RealNVP(5 * i, bijector_fn=splines[i])(
                  stack
              )
          return stack
  
      ys = spline_flow().forward(xs)
      ys_inv = spline_flow().inverse(
          ys
      )  # reconstruct ensures no cache hit.
  
      init_vars = []
      for s in splines:
          init_vars += [v.initializer for v in s.variables]
      self.evaluate(init_vars)
      self.assertAllClose(xs, self.evaluate(ys_inv))
  
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 1 for calling the RationalQuadraticSplineTest obj's underlying member method code with example usage: obj.testDocExample() and returns: stack, rational_quadratic_spline, unknown, unknown