code: def run_evaluate_episodes(agent, env, eval_episodes, render=False):
      avg_reward = 0.0
      for _ in range(eval_episodes):
          obs = env.reset()
          done = False
          while not done:
              action = agent.predict(obs)
              obs, reward, done, _ = env.step(action)
              avg_reward += reward
              if render:
                  env.render()
      avg_reward /= eval_episodes
      return avg_reward
  
file_path: PARL/examples/tutorials/parl2_dygraph/lesson5/homework/ddpg_quadrotor/train.py
imports: import gym
  import parl
  import paddle
  import argparse
  import numpy
  from parl.utils import logger, tensorboard, ReplayMemory
  from quadrotor_model import QuadrotorModel
  from quadrotor_agent import QuadrotorAgent
  from parl.algorithms import DDPG
  from rlschool import make_env
  import paddle
label_desc: Use image node_id 2 for calling a global function with example usage: run_evaluate_episodes(agent, env, eval_episodes, render) and returns: avg_reward