code: def testBijectorToTransformFn(self):
      bijectors = [
          tfp.bijectors.Identity(),
          tfp.bijectors.Scale(
              self._constant(
                  [
                      [1.0, 2.0],
                      [3.0, 4.0],
                  ]
              )
          ),
      ]
      state = [
          jnp.ones([2, 1], dtype=self._dtype),
          jnp.ones([2, 2], dtype=self._dtype),
      ]
      transform_fn = util_tfp.bijector_to_transform_fn(
          bijectors, state_structure=state, batch_ndims=1
      )
  
      fwd, (_, fwd_ldj1), fwd_ldj2 = fun_mc.call_transport_map_with_ldj(
          transform_fn, state
      )
      self.assertAllClose(
          [
              np.ones([2, 1]),
              np.array(
                  [
                      [1.0, 2.0],
                      [3.0, 4],
                  ]
              ),
          ],
          fwd,
      )
  
      true_fwd_ldj = np.array(
          [
              np.log(1) + np.log(2),
              np.log(3) + np.log(4),
          ]
      )
  
      self.assertAllClose(true_fwd_ldj, fwd_ldj1)
      self.assertAllClose(true_fwd_ldj, fwd_ldj2)
  
      inverse_transform_fn = util.inverse_fn(transform_fn)
      inv, (_, inv_ldj1), inv_ldj2 = fun_mc.call_transport_map_with_ldj(
          inverse_transform_fn, state
      )
      self.assertAllClose(
          [
              np.ones([2, 1]),
              np.array(
                  [
                      [1.0, 1.0 / 2.0],
                      [1.0 / 3.0, 1.0 / 4.0],
                  ]
              ),
          ],
          inv,
      )
      self.assertAllClose(-true_fwd_ldj, inv_ldj1)
      self.assertAllClose(-true_fwd_ldj, inv_ldj2)
  
imports: from absl.testing import parameterized
  from jax import config
  import numpy
  import tensorflow.compat.v2
  from fun_mc import backend
  from fun_mc import fun_mc_lib
  from fun_mc import test_util
  from fun_mc import util_tfp
label_desc: Use image node_id 4 for calling the UtilTFPTest obj's underlying member method code with example usage: obj.testBijectorToTransformFn() without return types