code: def test_chunking(self):
      mean_reducer = expectations_reducer.ExpectationsReducer()
      state = mean_reducer.initialize(tf.ones((3,)))
      for sample in range(6):
          state = mean_reducer.one_step(
              tf.ones((3, 9)) * sample, state, axis=1
          )
      mean = self.evaluate(mean_reducer.finalize(state))
      self.assertEqual((3,), mean.shape)
      self.assertAllEqual([2.5, 2.5, 2.5], mean)
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/expectations_reducer_test.py
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.experimental.mcmc import expectations_reducer
  from tensorflow_probability.python.experimental.mcmc import step
  from tensorflow_probability.python.experimental.mcmc import with_reductions
  from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the ExpectationsReducerTest obj's underlying member method code with example usage: obj.test_chunking() without return types