code: def test_reducers(self):
      builder = kernel_builder.KernelBuilder.make(lambda x: x)
      builder = builder.hmc(num_leapfrog_steps=3)
      self.assertIsInstance(
          builder.build(), with_reductions.WithReductions
      )
      builder = builder.clear_tracing()
      self.assertIsInstance(builder.build(), hmc.HamiltonianMonteCarlo)
      builder = builder.set_reducer([])
      self.assertIsInstance(
          builder.build(), with_reductions.WithReductions
      )
      builder = builder.clear_reducer()
      self.assertIsInstance(builder.build(), hmc.HamiltonianMonteCarlo)
      builder = builder.set_show_progress()
      self.assertIsInstance(
          builder.build(10), with_reductions.WithReductions
      )
      builder = builder.set_show_progress(False)
      self.assertIsInstance(builder.build(), hmc.HamiltonianMonteCarlo)
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/kernel_builder_test.py
imports: from tensorflow_probability.python.experimental.mcmc import kernel_builder
  from tensorflow_probability.python.experimental.mcmc import sample_discarding_kernel
  from tensorflow_probability.python.experimental.mcmc import with_reductions
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.mcmc import hmc
  from tensorflow_probability.python.mcmc import nuts
  from tensorflow_probability.python.mcmc import simple_step_size_adaptation
  from tensorflow_probability.python.mcmc import transformed_kernel
label_desc: Use image node_id 7 for calling the TestKernelBuilder obj's underlying member method code with example usage: obj.test_reducers() without return types