docstr: Reset only when lives are exhausted.
  This way all states are still reachable even though lives are episodic,
  and the learner need not know about any of this behind-the-scenes.
docstr_tok: ["Reset","only","when","lives","are","exhausted",".","This","way","all","states","are","still","reachable","even","though","lives","are","episodic",",","and","the","learner","need","not","know","about","any","of","this","behind-the-scenes","."]
code: def reset(self, **kwargs):
      """Reset only when lives are exhausted.
      This way all states are still reachable even though lives are episodic,
      and the learner need not know about any of this behind-the-scenes.
      """
      if self.was_real_done:
          obs = self.env.reset(**kwargs)
      else:
          # no-op step to advance from terminal/lost life state
          obs, _, _, _ = self.env.step(0)
      self.lives = self.env.unwrapped.ale.lives()
      return obs
  
imports: import time
  import numpy
  from collections import deque
  import gym
  from gym import spaces
  from parl.env.compat_wrappers import CompatWrapper, is_gym_version_ge, V_NPRANDOM_CHANGED
  import cv2
label_desc: Use image node_id 3 for calling the EpisodicLifeEnv obj's underlying member method code with example usage: obj.reset() and returns: obs