code: def __init__(
      self,
      max_size,
      obs_shape,
      context_len,
      load_file=False,
      file_path=None,
  ):
      self.max_size = int(max_size)
      self.obs_shape = obs_shape
      self.context_len = int(context_len)
  
      self.file_path = file_path
      if load_file and os.path.isfile(file_path):
          logger.info("load memory from file" + self.file_path)
          self.load_memory()
          logger.info("memory size is {}".format(self._curr_size))
      else:
          self.obs = np.zeros(
              (self.max_size,) + obs_shape, dtype="uint8"
          )
          self.action = np.zeros((self.max_size,), dtype="int32")
          self.reward = np.zeros((self.max_size,), dtype="float32")
          self.isOver = np.zeros((self.max_size,), dtype="bool")
  
          self._curr_size = 0
          self._curr_pos = 0
          self._context = deque(maxlen=context_len - 1)
  
file_path: PARL/benchmark/fluid/offline-Q-learning/replay_memory.py
imports: import numpy
  import copy
  import os
  from collections import deque, namedtuple
  from parl.utils import logger
label_desc: Use image node_id 1 to create a new ReplayMemory object from inherited base classes: object with example: obj = ReplayMemory(max_size, obs_shape, context_len, load_file, file_path)