class_docstr: Stress tests for the replay buffer, especially for new flags.
class_docstr_tok: ["Stress","tests","for","the","replay","buffer",",","especially","for","new","flags","."]
code: def test_stack_slaughter(self):
      stack_size = 7
      for i in range(1, NUM_TRAJ_LIMIT):
          traj_lengths = torch.randint(1, MAX_TRAJ_LEN, (i,))
          buffer_size = (
              traj_lengths.sum() + (i + 1) * (stack_size - 1)
          ).item()
          logger.info(
              f"Inserting {i} trajectories...\nArguments are: "
              f"buffer_size:{buffer_size}, "
              f"traj_lengths:{traj_lengths}, "
              f"stack_size:{stack_size}"
          )
          generic_stack_test_helper(
              buffer_size, traj_lengths.tolist(), stack_size
          )
          logger.info(f"Inserting {i} trajectories passed...")
  
file_path: ReAgent/reagent/test/replay_memory/extra_replay_buffer_test.py
imports: import logging
  import numpy
  import numpy.testing
  import torch
  from reagent.replay_memory.circular_replay_buffer import ReplayBuffer
  from reagent.test.base.horizon_test_base import HorizonTestBase
label_desc: Use image node_id 1 for calling the ExtraReplayBufferTest obj's underlying member method code with example usage: obj.test_stack_slaughter() without return types