code: def test_default_bijector(self, prior_fn, transition_fn):
      chain = markov_chain_lib.MarkovChain(
          initial_state_prior=prior_fn(),
          transition_fn=transition_fn,
          num_steps=7,
      )
  
      y = self.evaluate(chain.sample(seed=test_util.test_seed()))
      bijector = chain.experimental_default_event_space_bijector()
  
      self.assertAllEqual(
          chain.batch_shape_tensor(),
          bijector.experimental_batch_shape_tensor(),
      )
  
      x = bijector.inverse(y)
      yy = bijector.forward(
          tf.nest.map_structure(tf.identity, x)
      )  # Bypass bijector cache.
      self.assertAllCloseNested(y, yy)
  
      chain_event_ndims = tf.nest.map_structure(
          ps.rank_from_shape, chain.event_shape_tensor()
      )
      self.assertAllEqualNested(
          bijector.inverse_min_event_ndims, chain_event_ndims
      )
  
      ildj = bijector.inverse_log_det_jacobian(
          tf.nest.map_structure(
              tf.identity, y
          ),  # Bypass bijector cache.
          event_ndims=chain_event_ndims,
      )
      if not bijector.is_constant_jacobian:
          self.assertAllEqual(ildj.shape, chain.batch_shape)
      fldj = bijector.forward_log_det_jacobian(
          tf.nest.map_structure(
              tf.identity, x
          ),  # Bypass bijector cache.
          event_ndims=bijector.inverse_event_ndims(chain_event_ndims),
      )
      self.assertAllClose(ildj, -fldj)
  
      # Verify that event shapes are passed through and flattened/unflattened
      # correctly.
      inverse_event_shapes = bijector.inverse_event_shape(
          chain.event_shape
      )
      x_event_shapes = tf.nest.map_structure(
          lambda t, nd: t.shape[ps.rank(t) - nd :],
          x,
          bijector.forward_min_event_ndims,
      )
      self.assertAllEqualNested(inverse_event_shapes, x_event_shapes)
      forward_event_shapes = bijector.forward_event_shape(
          inverse_event_shapes
      )
      self.assertAllEqualNested(forward_event_shapes, chain.event_shape)
  
      # Verify that the outputs of other methods have the correct structure.
      inverse_event_shape_tensors = bijector.inverse_event_shape_tensor(
          chain.event_shape_tensor()
      )
      self.assertAllEqualNested(
          inverse_event_shape_tensors, x_event_shapes
      )
      forward_event_shape_tensors = bijector.forward_event_shape_tensor(
          inverse_event_shape_tensors
      )
      self.assertAllEqualNested(
          forward_event_shape_tensors, chain.event_shape_tensor()
      )
  
imports: from absl.testing import parameterized
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import split
  from tensorflow_probability.python.distributions import deterministic
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import joint_distribution_auto_batched
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import linear_gaussian_ssm
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import markov_chain
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.distributions import wishart
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the MarkovChainBijectorTest obj's underlying member method code with example usage: obj.test_default_bijector(prior_fn, transition_fn) without return types