code: def test_end_to_end_works_correctly(self):
      true_mean = self.dtype([0, 0])
      true_cov = self.dtype([[1, 0.5], [0.5, 1]])
      num_results = 500
  
      def target_log_prob(x, y):
          # Corresponds to unnormalized MVN.
          # z = matmul(inv(chol(true_cov)), [x, y] - true_mean)
          z = tf.stack([x, y], axis=-1) - true_mean
          z = tf.squeeze(
              tf.linalg.triangular_solve(
                  np.linalg.cholesky(true_cov), z[..., tf.newaxis]
              ),
              axis=-1,
          )
          return -0.5 * tf.reduce_sum(z**2.0, axis=-1)
  
      transformed_hmc = transformed_kernel.TransformedTransitionKernel(
          inner_kernel=hmc.HamiltonianMonteCarlo(
              target_log_prob_fn=tf.function(
                  target_log_prob, autograph=False
              ),
              # Affine scaling means we have to change the step_size
              # in order to get 60% acceptance, as was done in mcmc/hmc_test.py.
              step_size=[1.23 / 0.75, 1.23 / 0.5],
              num_leapfrog_steps=2,
          ),
          bijector=[
              scale.Scale(scale=0.75),
              scale.Scale(scale=0.5),
          ],
      )
      # Recall, sample.sample_chain calls
      # transformed_hmc.bootstrap_results too.
      states, kernel_results = sample.sample_chain(
          num_results=num_results,
          # The initial state is used by inner_kernel.bootstrap_results.
          # Note the input is *after* `bijector.forward`.
          current_state=[self.dtype(-2), self.dtype(2)],
          kernel=transformed_hmc,
          num_burnin_steps=200,
          num_steps_between_results=1,
          seed=test_util.test_seed(),
      )
      states = tf.stack(states, axis=-1)
      self.assertEqual(
          num_results, tf.compat.dimension_value(states.shape[0])
      )
      sample_mean = tf.reduce_mean(states, axis=0)
      x = states - sample_mean
      sample_cov = tf.matmul(x, x, transpose_a=True) / self.dtype(
          num_results
      )
      [sample_mean_, sample_cov_, is_accepted_] = self.evaluate(
          [
              sample_mean,
              sample_cov,
              kernel_results.inner_results.is_accepted,
          ]
      )
      self.assertAllClose(0.6, is_accepted_.mean(), atol=0.15, rtol=0.0)
      self.assertAllClose(sample_mean_, true_mean, atol=0.2, rtol=0.0)
      self.assertAllClose(sample_cov_, true_cov, atol=0.0, rtol=0.4)
  
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 5 for calling the TransformedTransitionKernelTest obj's underlying member method code with example usage: obj.test_end_to_end_works_correctly() and returns: unknown