docstr: Ensure that `log_accept_ratio` is close to 0 if step size is small.
code: def testLogAcceptRatio(self):
      """Ensure that `log_accept_ratio` is close to 0 if step size is small."""
      seed = test_util.test_seed()
  
      @tf.function(autograph=False)
      def sample_from_banana():
          def banana_model():
              x0 = yield jdc.JointDistributionCoroutine.Root(
                  normal.Normal(0.0, 10.0)
              )
              _ = yield normal.Normal(
                  0.03 * (tf.square(x0) - 100.0), 1.0
              )
  
          banana = jdc.JointDistributionCoroutine(banana_model)
          kernel = nuts.NoUTurnSampler(banana.log_prob, step_size=0.35)
          trace_fn = lambda _, pkr: pkr.log_accept_ratio
          return sample.sample_chain(
              50,
              [0.0, 0.0],
              kernel=kernel,
              trace_fn=trace_fn,
              seed=seed,
          )[1]
  
      log_accept_ratio_trace = self.evaluate(sample_from_banana())
      self.assertAllGreater(log_accept_ratio_trace, -0.35)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  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 sample
  from tensorflow_probability.python.distributions import sigmoid_beta
  from tensorflow_probability.python.distributions import student_t
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import assert_util
  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 diagnostic
  from tensorflow_probability.python.mcmc import dual_averaging_step_size_adaptation
  from tensorflow_probability.python.mcmc import nuts
  from tensorflow_probability.python.mcmc import sample
  from tensorflow_probability.python.mcmc import transformed_kernel
  from tensorflow_probability.python.stats import sample_stats
label_desc: Use image node_id 1 for calling the NutsTest obj's underlying member method code with example usage: obj.testLogAcceptRatio() and returns: sample