code: def run_evaluate_episodes(env, agents, eval_episodes):
      eval_episode_rewards = []
      eval_episode_steps = []
      while len(eval_episode_rewards) < eval_episodes:
          obs_n = env.reset()
          done = False
          total_reward = 0
          steps = 0
          while not done and steps < MAX_STEP_PER_EPISODE:
              steps += 1
              action_n = [
                  agent.predict(obs)
                  for agent, obs in zip(agents, obs_n)
              ]
              obs_n, reward_n, done_n, _ = env.step(action_n)
              done = all(done_n)
              total_reward += sum(reward_n)
              # show animation
              if args.show:
                  time.sleep(0.1)
                  env.render()
  
          eval_episode_rewards.append(total_reward)
          eval_episode_steps.append(steps)
      return eval_episode_rewards, eval_episode_steps
  
file_path: PARL/examples/MADDPG/train.py
imports: import os
  import time
  import argparse
  import numpy
  from simple_model import MAModel
  from simple_agent import MAAgent
  from parl.algorithms import MADDPG
  from parl.env.multiagent_env import MAenv
  from parl.utils import logger, summary
  from gym import spaces
label_desc: Use image node_id 1 for calling a global function with example usage: run_evaluate_episodes(env, agents, eval_episodes) and returns: eval_episode_rewards,  eval_episode_steps