code: def testAddBatch(self):
      spec = specs.TensorSpec([3], tf.int32, "lidar")
      replay_buffer = episodic_replay_buffer.EpisodicReplayBuffer(
          spec,
          capacity=3,
          begin_episode_fn=lambda _: False,
          end_episode_fn=lambda _: False,
      )
  
      stateful_replay_buffer = (
          episodic_replay_buffer.StatefulEpisodicReplayBuffer(
              replay_buffer, num_episodes=3
          )
      )
      values = np.ones(spec.shape.as_list(), dtype=np.int32)
      values = np.stack([values, 10 * values, 100 * values])
      new_episode_ids = stateful_replay_buffer.add_batch(values)
      item_0 = replay_buffer._get_episode(0)
      item_1 = replay_buffer._get_episode(1)
      item_2 = replay_buffer._get_episode(2)
      # We appended one time step to each of 3 episodes.  If we tf.stack
      # the line below, we would end up with shape
      #  (batch_size, time_steps, depth) == (3, 1, 3).
      #
      # Instead we concat here to make testing easier below.
      items = tf.nest.map_structure(
          lambda *x: tf.concat(x, 0), item_0, item_1, item_2
      )
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.evaluate(tf.compat.v1.local_variables_initializer())
      self.assertAllEqual([0, 1, 2], self.evaluate(new_episode_ids))
      self.assertEqual(
          2, self.evaluate(replay_buffer._get_last_episode_id())
      )
      self.assertAllEqual(values, self.evaluate(items))
  
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 8 for calling the StatefulEpisodicReplayBufferTest obj's underlying member method code with example usage: obj.testAddBatch() without return types