code: def __init__(
      self,
      capacity,
      device,
      history=4,
      discount=0.99,
      multi_step=3,
      priority_weight=0.4,
      priority_exponent=0.5,
  ):
      self.capacity = capacity
      self.device = device
  
      self.history = history
      self.discount = discount
      self.multi_step = multi_step
      self.priority_weight = priority_weight
      self.priority_exponent = priority_exponent
  
      self.timestep = 0
      self.transitions = SegmentTree(capacity)
  
file_path: SerpentAI/serpent/machine_learning/reinforcement_learning/rainbow_dqn/replay_memory.py
imports: import collections
  import random
  import torch
  from serpent.machine_learning.reinforcement_learning.rainbow_dqn.segment_tree import SegmentTree
label_desc: Use image node_id 1 to create a new ReplayMemory object  with example: obj = ReplayMemory(capacity, device, history, discount, multi_step, priority_weight, priority_exponent)