code: def testExtractNoClear(self):
      num_episodes = 5
      episode_length = 3
      spec = specs.TensorSpec([], tf.int32, "action")
      replay_buffer = episodic_replay_buffer.EpisodicReplayBuffer(
          spec,
          capacity=num_episodes - 1,
          begin_episode_fn=lambda _: True,
          end_episode_fn=lambda _: False,
      )
      episode_id = replay_buffer.create_episode_ids()
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.evaluate(tf.compat.v1.local_variables_initializer())
      for i in range(num_episodes):
          episode_id = replay_buffer.add_sequence(
              i * tf.ones([episode_length], dtype=tf.int32), episode_id
          )
      self.evaluate(episode_id)
      episodes = replay_buffer.extract([1, 0], clear_data=False)
      [
          episodes_length_,
          episodes_completed_,
          extracted_first_,
          extracted_second_,
      ] = self.evaluate(
          [
              episodes.length,
              episodes.completed,
              list_ops.tensor_list_stack(
                  episodes.tensor_lists[0], spec.dtype
              ),
              list_ops.tensor_list_stack(
                  episodes.tensor_lists[1], spec.dtype
              ),
          ]
      )
      self.assertAllEqual(
          episodes_length_, [episode_length, episode_length]
      )
      self.assertAllEqual(episodes_completed_, [False, False])
      self.assertAllClose(extracted_first_, [1] * episode_length)
      self.assertAllClose(extracted_second_, [4] * episode_length)
  
      # The location associated with episode ID 0 is not cleared.
      self.assertAllClose(
          self.evaluate(replay_buffer._get_episode(num_episodes - 1)),
          [num_episodes - 1] * episode_length,
      )
      # The episode ID 1 (extracted) was not cleared.
      self.assertAllClose(
          self.evaluate(replay_buffer._get_episode(1)),
          [1.0] * episode_length,
      )
  
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 26 for calling the EpisodicReplayBufferTest obj's underlying member method code with example usage: obj.testExtractNoClear() without return types