code: def test_stack(self):
      builder = kernel_builder.KernelBuilder.make(lambda x: x)
      builder = (
          builder.hmc(num_leapfrog_steps=3)
          .simple_adaptation(adaptation_rate=0.03)
          .transform([])
          .set_num_steps_between_results(10)
      )
      kernel = builder.build(10)
      self.assertIsInstance(kernel, with_reductions.WithReductions)
      kernel = kernel.inner_kernel
      self.assertIsInstance(
          kernel, sample_discarding_kernel.SampleDiscardingKernel
      )
      kernel = kernel.inner_kernel
      self.assertIsInstance(
          kernel, transformed_kernel.TransformedTransitionKernel
      )
      kernel = kernel.inner_kernel
      self.assertIsInstance(
          kernel, simple_step_size_adaptation.SimpleStepSizeAdaptation
      )
      kernel = kernel.inner_kernel
      self.assertIsInstance(kernel, 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 1 for calling the TestKernelBuilder obj's underlying member method code with example usage: obj.test_stack() without return types