code: def testAddSingleSample(self):
      spec = [
          specs.TensorSpec([3], tf.float32, "action"),
          [
              specs.TensorSpec([5], tf.float32, "lidar"),
              specs.TensorSpec([3, 2], tf.float32, "camera"),
          ],
      ]
      replay_buffer = episodic_replay_buffer.EpisodicReplayBuffer(
          spec,
          capacity=3,
          begin_episode_fn=lambda _: False,
          end_episode_fn=lambda _: False,
      )
      episode_ids = replay_buffer.create_episode_ids(num_episodes=1)
  
      action = 1 * np.ones(spec[0].shape.as_list(), dtype=np.float32)
      lidar = 2 * np.ones(spec[1][0].shape.as_list(), dtype=np.float32)
      camera = 3 * np.ones(spec[1][1].shape.as_list(), dtype=np.float32)
      values = [action, [lidar, camera]]
      values_batched = tf.nest.map_structure(
          lambda t: tf.stack([t] * 1), values
      )
  
      episode_len_1_values = tf.nest.map_structure(
          lambda arr: np.expand_dims(arr, 0), values
      )
  
      new_episode_ids = replay_buffer.add_batch(
          values_batched, episode_ids
      )
      sample, _ = replay_buffer.get_next()
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.evaluate(tf.compat.v1.local_variables_initializer())
      new_episode_ids_value = self.evaluate(new_episode_ids)
      self.assertEqual(new_episode_ids_value, 0)
      sample_ = self.evaluate(sample)
      self._assertNestedCloseness(
          self.assertAllClose, episode_len_1_values, 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 12 for calling the EpisodicReplayBufferTest obj's underlying member method code with example usage: obj.testAddSingleSample() without return types