class_docstr: An in-progress episode.
  
  Compared to EpisodeBatch, this datatype does less checking, only
  contains one episodes, and uses lists instead of numpy arrays to make
  stepping faster.
  
  Args:
      env (Environment): The environment the trajectory is being collected
          in.
      initial_observation (np.ndarray): The first observation. If None, the
          environment will be reset to generate this observation.
      episode_info (dict[str, np.ndarray]): Info for this episode.
  
  Raises:
      ValueError: if either initial_observation and episode_info is passed in
          but not the other. Either both or neither should be passed in.
code: def __init__(self, env, initial_observation=None, episode_info=None):
      if initial_observation is None and episode_info is not None:
          raise ValueError(
              "Initial observation and episode info must be both or "
              "neither provided, but only episode info was passed in"
          )
      if initial_observation is not None and episode_info is None:
          raise ValueError(
              "Initial observation and episode info must be both or "
              "neither provided, but only initial observation was passed in"
          )
  
      if initial_observation is None:
          initial_observation, episode_info = env.reset()
      self.env = env
      self.episode_info = episode_info
      self.observations = [initial_observation]
      self.actions = []
      self.rewards = []
      self.step_types = []
      self.agent_infos = collections.defaultdict(list)
      self.env_infos = collections.defaultdict(list)
  
imports: import collections
  import numpy
  from garage import EpisodeBatch, StepType
label_desc: Use image node_id 1 to create a new InProgressEpisode object  with example: obj = InProgressEpisode(env, initial_observation, episode_info)