code: def test_support_works_correctly_with_hmc(self):
      num_results = 500
      target = beta.Beta(
          concentration1=self.dtype(1.0),
          concentration0=self.dtype(10.0),
      )
      transformed_hmc = transformed_kernel.TransformedTransitionKernel(
          inner_kernel=hmc.HamiltonianMonteCarlo(
              target_log_prob_fn=tf.function(
                  target.log_prob, autograph=False
              ),
              step_size=1.64,
              num_leapfrog_steps=2,
          ),
          bijector=sigmoid.Sigmoid(),
      )
      # 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(0.25),
          kernel=transformed_hmc,
          num_burnin_steps=200,
          num_steps_between_results=1,
          seed=test_util.test_seed(),
      )
      self.assertEqual(
          num_results, tf.compat.dimension_value(states.shape[0])
      )
      sample_mean = tf.reduce_mean(states, axis=0)
      sample_var = tf.reduce_mean(
          tf.math.squared_difference(states, sample_mean), axis=0
      )
      [
          sample_mean_,
          sample_var_,
          is_accepted_,
          true_mean_,
          true_var_,
      ] = self.evaluate(
          [
              sample_mean,
              sample_var,
              kernel_results.inner_results.is_accepted,
              target.mean(),
              target.variance(),
          ]
      )
      self.assertAllClose(true_mean_, sample_mean_, atol=0.15, rtol=0.0)
      self.assertAllClose(true_var_, sample_var_, atol=0.03, rtol=0.2)
      self.assertNear(0.6, is_accepted_.mean(), err=0.15)
  
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 2 for calling the TransformedTransitionKernelTest obj's underlying member method code with example usage: obj.test_support_works_correctly_with_hmc() without return types