code: def testLeapfrogStepCounter(
      self, tree_depth, unrolled_leapfrog_steps
  ):
      def never_u_turns_log_prob(x):
          return 1e-6 * x
  
      kernel = nuts_autobatching.NoUTurnSampler(
          never_u_turns_log_prob,
          step_size=[0.3],
          use_auto_batching=True,
          stackless=False,
          unrolled_leapfrog_steps=unrolled_leapfrog_steps,
          max_tree_depth=tree_depth,
          seed=1,
      )
      _, extra = sample.sample_chain(
          num_results=1,
          num_burnin_steps=0,
          current_state=[tf.ones([1])],
          kernel=kernel,
          parallel_iterations=1,
      )
      self.assertEqual(
          [(2**tree_depth - 1) * unrolled_leapfrog_steps],
          self.evaluate(extra.leapfrogs_taken),
      )
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import scale_matvec_tril
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.distributions import wishart
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.mcmc import nuts_autobatching
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import sample
label_desc: Use image node_id 1 for calling the NutsTest obj's underlying member method code with example usage: obj.testLeapfrogStepCounter(tree_depth, unrolled_leapfrog_steps) and returns: unknown