code: def push(self, *args):
      if len(self.memory) < self.capacity:
          self.memory.append(self.Transition(*args))
      else:
          self.memory[self.position] = self.Transition(*args)
  
      self.position = (self.position + 1) % self.capacity
  
file_path: tensortrade/tensortrade/agents/replay_memory.py
imports: from deprecated import deprecated
  import random
  from collections import namedtuple
  from typing import List
label_desc: Use image node_id 2 for calling the ReplayMemory obj's underlying member method code with example usage: obj.push() without return types