code: def test_reducer_warm_restart(self):
      fake_kernel = test_fixtures.TestTransitionKernel()
      fake_reducer = test_fixtures.NaiveMeanReducer()
      seed1, seed2 = samplers.split_seed(
          test_util.test_seed(sampler_type="stateless")
      )
      red_res, last_sample, kr, red_states = sample_fold(
          num_steps=5,
          current_state=0.0,
          kernel=fake_kernel,
          reducer=fake_reducer,
          return_final_reducer_states=True,
          seed=seed1,
      )
      red_res, last_sample, kernel_results, red_states = self.evaluate(
          [red_res, last_sample, kr, red_states]
      )
      self.assertEqual(3, red_res)
      self.assertEqual(5, last_sample)
      self.assertEqual(5, kernel_results.counter_1)
      self.assertEqual(10, kernel_results.counter_2)
  
      # Warm-restart the underlying kernel and the reduction
      reduction_rslt_2, last_sample_2, kr_2 = sample_fold(
          num_steps=5,
          current_state=last_sample,
          previous_kernel_results=kernel_results,
          kernel=fake_kernel,
          reducer=fake_reducer,
          previous_reducer_state=red_states,
          seed=seed2,
      )
      reduction_rslt_2, last_sample_2, kernel_results_2 = self.evaluate(
          [reduction_rslt_2, last_sample_2, kr_2]
      )
      self.assertEqual(5.5, reduction_rslt_2)
      self.assertEqual(10, last_sample_2)
      self.assertEqual(10, kernel_results_2.counter_1)
      self.assertEqual(20, kernel_results_2.counter_2)
  
imports: import collections
  import warnings
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.experimental.mcmc import covariance_reducer
  from tensorflow_probability.python.experimental.mcmc import expectations_reducer
  from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures
  from tensorflow_probability.python.experimental.mcmc.sample_fold import sample_chain_with_burnin
  from tensorflow_probability.python.experimental.mcmc.sample_fold import sample_fold
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import hmc
label_desc: Use image node_id 2 for calling the SampleFoldTest obj's underlying member method code with example usage: obj.test_reducer_warm_restart() without return types