class_docstr: Worker with a single policy and multiple environments.
  
  Alternates between taking a single step in all environments and asking the
  policy for an action for every environment. This allows computing a batch
  of actions, which is generally much more efficient than computing a single
  action when using neural networks.
  
  Args:
      seed (int): The seed to use to intialize random number generators.
      max_episode_length (int or float): The maximum length of episodes which
          will be sampled. Can be (floating point) infinity.
      worker_number (int): The number of the worker this update is
          occurring in. This argument is used  set a different seed for
          each worker.
      n_envs (int): Number of environment copies to use.
class_docstr_tok: ["Worker","with","a","single","policy","and","multiple","environments",".","Alternates","between","taking","a","single","step","in","all","environments","and","asking","the","policy","for","an","action","for","every","environment",".","This","allows","computing","a","batch","of","actions",",","which","is","generally","much","more","efficient","than","computing","a","single","action","when","using","neural","networks",".","Args",":","seed","(","int",")",":","The","seed","to","use","to","intialize","random","number","generators",".","max_episode_length","(","int","or","float",")",":","The","maximum","length","of","episodes","which","will","be","sampled",".","Can","be","(","floating","point",")","infinity",".","worker_number","(","int",")",":","The","number","of","the","worker","this","update","is","occurring","in",".","This","argument","is","used","set","a","different","seed","for","each","worker",".","n_envs","(","int",")",":","Number","of","environment","copies","to","use","."]
docstr: Take a single time-step in the current episode.
  
  Returns:
      bool: True iff at least one of the episodes was completed.
docstr_tok: ["Take","a","single","time-step","in","the","current","episode",".","Returns",":","bool",":","True","iff","at","least","one","of","the","episodes","was","completed","."]
code: def step_episode(self):
      """Take a single time-step in the current episode.
  
      Returns:
          bool: True iff at least one of the episodes was completed.
      """
      finished = False
      actions, agent_info = self.agent.get_actions(self._prev_obs)
      completes = [False] * len(self._envs)
      for i, action in enumerate(actions):
          if self._episode_lengths[i] < self._max_episode_length:
              es = self._envs[i].step(action)
              self._observations[i].append(self._prev_obs[i])
              self._rewards[i].append(es.reward)
              self._actions[i].append(es.action)
              for k, v in agent_info.items():
                  self._agent_infos[i][k].append(v[i])
              for k, v in es.env_info.items():
                  self._env_infos[i][k].append(v)
              self._episode_lengths[i] += 1
              self._step_types[i].append(es.step_type)
              self._prev_obs[i] = es.observation
          if (
              self._episode_lengths[i] >= self._max_episode_length
              or es.last
          ):
              self._gather_episode(i, es.observation)
              completes[i] = True
              finished = True
      if finished:
          self.agent.reset(completes)
      return finished
  
file_path: garage/src/garage/sampler/vec_worker.py
imports: import collections
  import copy
  import numpy
  from garage import EpisodeBatch, StepType
  from garage.sampler import _apply_env_update
  from garage.sampler.default_worker import DefaultWorker
label_desc: Use image node_id 6 for calling the VecWorker obj's underlying member method code with example usage: obj.step_episode() and returns: finished