code: def main():
      env = get_player(
          args.rom,
          image_size=IMAGE_SIZE,
          train=True,
          frame_skip=FRAME_SKIP,
      )
      file_path = "memory.npz"
      rpm = ReplayMemory(
          MEMORY_SIZE,
          IMAGE_SIZE,
          CONTEXT_LEN,
          load_file=True,  # load replay memory data from file
          file_path=file_path,
      )
      act_dim = env.action_space.n
  
      model = AtariModel(act_dim)
      algorithm = DQN(
          model,
          act_dim=act_dim,
          gamma=GAMMA,
          lr=LEARNING_RATE * gpu_num,
      )
      agent = AtariAgent(
          algorithm, act_dim=act_dim, total_step=args.train_total_steps
      )
      if os.path.isfile("./model_dir"):
          logger.info("load model from file")
          agent.restore("./model_dir")
  
      if args.train:
          logger.info("train with memory data")
          run_train_step(agent, rpm)
          logger.info("finish training. Save the model.")
          agent.save("./model_dir")
      else:
          logger.info("collect experience")
          collect_exp(env, rpm, agent)
          rpm.save_memory()
          logger.info("finish collecting, save successfully")
  
file_path: PARL/benchmark/fluid/offline-Q-learning/parallel_run.py
imports: from parl.utils import check_version_for_fluid
  import argparse
  import gym
  import numpy
  import os
  import time
  from tqdm import tqdm
  import parl
  import paddle.fluid
  from parl.utils import get_gpu_count
  from parl.utils import summary, logger
  from dqn import DQN
  from atari_agent import AtariAgent
  from atari_model import AtariModel
  from replay_memory import ReplayMemory, Experience
  from utils import get_player
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types