code: def test_nested_transform(self):
      target_dist = normal.Normal(loc=0.0, scale=1.0)
      b1 = scale.Scale(0.5)
      b2 = exp.Exp()
      chain = chain_lib.Chain(
          [b2, b1]
      )  # applies bijectors right to left (b1 then b2).
      inner_kernel = transformed_kernel.TransformedTransitionKernel(
          inner_kernel=hmc.HamiltonianMonteCarlo(
              target_log_prob_fn=target_dist.log_prob,
              num_leapfrog_steps=27,
              step_size=10,
          ),
          bijector=b1,
      )
      outer_kernel = transformed_kernel.TransformedTransitionKernel(
          inner_kernel=inner_kernel, bijector=b2
      )
      chain_kernel = transformed_kernel.TransformedTransitionKernel(
          inner_kernel=hmc.HamiltonianMonteCarlo(
              target_log_prob_fn=target_dist.log_prob,
              num_leapfrog_steps=27,
              step_size=10,
          ),
          bijector=chain,
      )
      outer_pkr_one, outer_pkr_two = self.evaluate(
          [
              outer_kernel.bootstrap_results(2.0),
              outer_kernel.bootstrap_results(9.0),
          ]
      )
  
      # the outermost kernel only applies the outermost bijector
      self.assertNear(
          np.log(2.0), outer_pkr_one.transformed_state, err=1e-6
      )
      self.assertNear(
          np.log(9.0), outer_pkr_two.transformed_state, err=1e-6
      )
  
      chain_pkr_one, chain_pkr_two = self.evaluate(
          [
              chain_kernel.bootstrap_results(2.0),
              chain_kernel.bootstrap_results(9.0),
          ]
      )
  
      # all bijectors are applied to the inner kernel, from innermost to outermost
      # this behavior is completely analogous to a bijector Chain
      self.assertNear(
          chain_pkr_one.transformed_state,
          outer_pkr_one.inner_results.transformed_state,
          err=1e-6,
      )
      self.assertEqual(
          chain_pkr_one.inner_results.accepted_results,
          outer_pkr_one.inner_results.inner_results.accepted_results,
      )
      self.assertNear(
          chain_pkr_two.transformed_state,
          outer_pkr_two.inner_results.transformed_state,
          err=1e-6,
      )
      self.assertEqual(
          chain_pkr_two.inner_results.accepted_results,
          outer_pkr_two.inner_results.inner_results.accepted_results,
      )
  
      seed = test_util.test_seed(sampler_type="stateless")
      outer_results_one, outer_results_two = self.evaluate(
          [
              outer_kernel.one_step(2.0, outer_pkr_one, seed=seed),
              outer_kernel.one_step(9.0, outer_pkr_two, seed=seed),
          ]
      )
      chain_results_one, chain_results_two = self.evaluate(
          [
              chain_kernel.one_step(2.0, chain_pkr_one, seed=seed),
              chain_kernel.one_step(9.0, chain_pkr_two, seed=seed),
          ]
      )
      self.assertNear(
          chain_results_one[0], outer_results_one[0], err=1e-6
      )
      self.assertNear(
          chain_results_two[0], outer_results_two[0], err=1e-6
      )
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import cholesky_lkj
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  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.internal import test_util
  from tensorflow_probability.python.mcmc import hmc
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc import langevin
  from tensorflow_probability.python.mcmc import random_walk_metropolis
  from tensorflow_probability.python.mcmc import sample
  from tensorflow_probability.python.mcmc import simple_step_size_adaptation
  from tensorflow_probability.python.mcmc import transformed_kernel
label_desc: Use image node_id 14 for calling the TransformedTransitionKernelTest obj's underlying member method code with example usage: obj.test_nested_transform() without return types