code: def test_sample_fold(self):
      num_results = 3
      pbar = progress_bar_reducer.ProgressBarReducer(
          num_results, test_progress_bar_fn
      )
      fake_kernel = test_fixtures.TestTransitionKernel()
      reductions, final_state, kernel_results = sample_fold(
          num_steps=num_results,
          current_state=0.0,
          kernel=fake_kernel,
          reducer=pbar,
      )
      reductions, final_state, kernel_results = self.evaluate(
          [reductions, final_state, kernel_results]
      )
      self.assertEqual([], reductions)
      self.assertEqual(num_results, final_state)
      self.assertEqual(num_results, kernel_results.counter_1)
      self.assertEqual(num_results * 2, kernel_results.counter_2)
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer_test.py
imports: from tensorflow_probability.python.experimental.mcmc import progress_bar_reducer
  from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures
  from tensorflow_probability.python.experimental.mcmc.sample_fold import sample_fold
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling the ProgressBarReducerTest obj's underlying member method code with example usage: obj.test_sample_fold() without return types