code: def testAddSingleMultipleTimesSampleAsDatasetBatchedMultiStep(self):
      spec = specs.TensorSpec([3], tf.int32, "lidar")
      replay_buffer = episodic_replay_buffer.EpisodicReplayBuffer(
          spec,
          capacity=2,
          begin_episode_fn=lambda _: False,
          end_episode_fn=lambda _: False,
      )
      replay_buffer_stateful = (
          episodic_replay_buffer.StatefulEpisodicReplayBuffer(
              replay_buffer, num_episodes=1
          )
      )
      values = np.expand_dims(
          np.ones(spec.shape.as_list(), dtype=np.int32), 0
      )
      values = [values, 10 * values, 100 * values]
      simple_values = [1, 10, 100]
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.evaluate(tf.compat.v1.local_variables_initializer())
      self.evaluate(replay_buffer_stateful.add_batch(values[0]))
      self.evaluate(replay_buffer_stateful.add_batch(values[1]))
      self.evaluate(replay_buffer_stateful.add_batch(values[2]))
      sample_next = sample_as_dataset(
          replay_buffer, num_steps=2, batch_size=100
      )[0]
      self.assertEqual(sample_next.shape[1:].as_list(), [2, 3])
      sample_ = self.evaluate(sample_next)
  
      # Shape should be batch_size x num_steps x tensor spec.
      self.assertEqual(sample_.shape, (100, 2, 3))
  
      for multi_item in sample_:
          self._assertCircularOrdering(
              simple_values, [item[0] for item in multi_item]
          )
  
      self._assertContains(
          list(values), [multi_item[0] for multi_item in sample_]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents import specs
  from tf_agents.replay_buffers import episodic_replay_buffer
  from tf_agents.utils import common
  from tf_agents.utils import test_utils
  from tensorflow.python.ops import list_ops
label_desc: Use image node_id 7 for calling the StatefulEpisodicReplayBufferTest obj's underlying member method code with example usage: obj.testAddSingleMultipleTimesSampleAsDatasetBatchedMultiStep() without return types