code: def test_example(self):
      target_log_prob_fn = normal.Normal(loc=0.0, scale=1.0).log_prob
      num_burnin_steps = 500
      num_results = 500
      num_chains = 64
      step_size = 0.1
  
      kernel = hmc.HamiltonianMonteCarlo(
          target_log_prob_fn=target_log_prob_fn,
          num_leapfrog_steps=2,
          step_size=step_size,
      )
      kernel = sssa.SimpleStepSizeAdaptation(
          inner_kernel=kernel,
          num_adaptation_steps=int(num_burnin_steps * 0.8),
      )
  
      @tf.function(autograph=False)
      def do_sampling():
          _, log_accept_ratio = sample.sample_chain(
              num_results=num_results,
              num_burnin_steps=num_burnin_steps,
              current_state=tf.zeros(num_chains),
              kernel=kernel,
              trace_fn=lambda _, pkr: pkr.inner_results.log_accept_ratio,
              seed=test_util.test_seed(),
          )
          return log_accept_ratio
  
      log_accept_ratio = do_sampling()
      p_accept = tf.math.exp(
          generic.reduce_logmeanexp(tf.minimum(log_accept_ratio, 0.0))
      )
  
      self.assertAllClose(0.75, self.evaluate(p_accept), atol=0.15)
  
imports: import collections
  import functools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.experimental.mcmc import sharded
  from tensorflow_probability.python.internal import distribute_lib
  from tensorflow_probability.python.internal import distribute_test_lib
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import generic
  from tensorflow_probability.python.mcmc import hmc
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc import sample
  from tensorflow_probability.python.mcmc import simple_step_size_adaptation
label_desc: Use image node_id 1 for calling the SimpleStepSizeAdaptationExampleTest obj's underlying member method code with example usage: obj.test_example() and returns: log_accept_ratio