code: def new_episode():
      """Start a new episode.
  
      For Atari games, perform no-op actions at the beginning of the episode.
      """
      observation = env.reset()
      if args.render:
          env.render()
      if isinstance(env.env, AtariEnv):
          for t in range(args.num_noop):
              observation, reward, isTerminal, _ = env.step(0)
              if isTerminal:
                  print(
                      "WARNING: Terminal signal received after {0} steps"
                      "".format(t)
                  )
              if args.render:
                  env.render()
      return observation
  
file_path: CNTK/Examples/ReinforcementLearning/deeprl/scripts/run.py
imports: import argparse
  import os
  import shelve
  import sys
  import time
  from contextlib import closing
  import numpy
  from gym import envs
  from gym.envs.atari.atari_env import AtariEnv
  from cntk.contrib.deeprl.agent import agent_factory
  from env import env_factory
label_desc: Use image node_id 1 for calling a global function with example usage: new_episode() and returns: observation