class_docstr: Experience Replay Buffer
  
  As described in
  https://storage.googleapis.com/deepmind-media/dqn/DQNNaturePaper.pdf.
  
  Args:
      capacity (int): capacity in terms of number of transitions
      num_steps (int): Number of timesteps per stored transition
          (for N-step updates)
class_docstr_tok: ["Experience","Replay","Buffer","As","described","in","https",":","\/\/storage.googleapis.com\/deepmind-media\/dqn\/DQNNaturePaper.pdf",".","Args",":","capacity","(","int",")",":","capacity","in","terms","of","number","of","transitions","num_steps","(","int",")",":","Number","of","timesteps","per","stored","transition","(","for","N-step","updates",")"]
code: def __init__(
      self, capacity: Optional[int] = None, num_steps: int = 1
  ):
      self.capacity = capacity
      assert num_steps > 0
      self.num_steps = num_steps
      self.memory = RandomAccessQueue(maxlen=capacity)
      self.last_n_transitions: collections.defaultdict = (
          collections.defaultdict(
              lambda: collections.deque([], maxlen=num_steps)
          )
      )
  
file_path: pfrl/pfrl/replay_buffers/replay_buffer.py
imports: import collections
  import pickle
  from typing import Optional
  from pfrl import replay_buffer
  from pfrl.collections.random_access_queue import RandomAccessQueue
label_desc: Use image node_id 1 to create a new ReplayBuffer object from inherited base classes: replay_buffer with example: obj = ReplayBuffer(capacity, num_steps)