code: def test_episode(env, agent):
      total_reward = 0
      obs = env.reset()
      while True:
          action = agent.predict(obs)  # greedy
          next_obs, reward, done, _ = env.step(action)
          total_reward += reward
          obs = next_obs
          time.sleep(0.5)
          env.render()
          if done:
              print("test reward = %.1f" % (total_reward))
              break
  
imports: import gym
  from gridworld import CliffWalkingWapper, FrozenLakeWapper
  from agent import QLearningAgent
  import time
label_desc: Use image node_id 2 for calling a global function with example usage: test_episode(env, agent) without return types