code: def testNumFrames(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=5,
          begin_episode_fn=lambda _: False,
          end_episode_fn=lambda _: False,
      )
  
      episode_ids_var = common.create_variable(
          "episode_id",
          initial_value=-1,
          shape=(2,),
          use_local_variable=True,
      )
  
      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] * 2), values
      )
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.evaluate(tf.compat.v1.local_variables_initializer())
  
      @common.function_in_tf1()
      def add_to_buffer(values_batched):
          new_episode_ids = replay_buffer.add_batch(
              values_batched, episode_ids_var
          )
          episode_ids_var.assign(new_episode_ids)
          return new_episode_ids
  
      for _ in range(4):
          self.evaluate(add_to_buffer(values_batched))
  
      num_frames = replay_buffer.num_frames()
      num_frames_value = self.evaluate(num_frames)
      self.assertEqual(num_frames_value, 8)
  
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 13 for calling the EpisodicReplayBufferTest obj's underlying member method code with example usage: obj.testNumFrames() and returns: new_episode_ids