class_docstr: Creates a simple wrapper for multiple environments, calling each environment in sequence on the current
  Python process. This is useful for computationally simple environment such as ``cartpole-v1``, as the overhead of
  multiprocess or multi-thread outweighs the environment computation time. This can also be used for RL methods that
  require a vectorized environment, but that you want a single environments to train with.
  
  :param env_factories: A list of functions that will create the environments
class_docstr_tok: ["Creates","a","simple","wrapper","for","multiple","environments",",","calling","each","environment","in","sequence","on","the","current","Python","process",".","This","is","useful","for","computationally","simple","environment","such","as","``","cartpole-v1","``",",","as","the","overhead","of","multiprocess","or","multi-thread","outweighs","the","environment","computation","time",".","This","can","also","be","used","for","RL","methods","that","require","a","vectorized","environment",",","but","that","you","want","a","single","environments","to","train","with",".",":","param","env_factories",":","A","list","of","functions","that","will","create","the","environments"]
docstr: Step the environments with the given actions.
  
  :param actions: the list of actions for the respective envs.
  :return: observations, rewards, dones, information-dicts all in env-aggregated form.
docstr_tok: ["Step","the","environments","with","the","given","actions",".",":","param","actions",":","the","list","of","actions","for","the","respective","envs",".",":","return",":","observations",",","rewards",",","dones",",","information-dicts","all","in","env-aggregated","form","."]
code: def step(
      self, actions: ActionType
  ) -> Tuple[
      ObservationType, np.ndarray, np.ndarray, Iterable[Dict[Any, Any]]
  ]:
      """Step the environments with the given actions.
  
      :param actions: the list of actions for the respective envs.
      :return: observations, rewards, dones, information-dicts all in env-aggregated form.
      """
      actions = unstack_numpy_list_dict(actions)
      (
          observations,
          rewards,
          env_dones,
          infos,
          actor_dones,
          actor_ids,
      ) = ([], [], [], [], [], [])
  
      for i, env in enumerate(self.envs):
          o, r, env_done, i = env.step(actions[i])
          actor_dones.append(env.is_actor_done())
          actor_ids.append(env.actor_id())
  
          if env_done:
              o = env.reset()
              # collect the episode statistics for finished environments
              self.epoch_stats.receive(
                  env.get_stats(LogStatsLevel.EPISODE).last_stats
              )
  
          observations.append(o)
          rewards.append(r)
          env_dones.append(env_done)
          infos.append(i)
  
      obs = stack_numpy_dict_list(observations)
      rewards = np.hstack(rewards).astype(np.float32)
      env_dones = np.hstack(env_dones)
  
      self._env_times = np.array(
          [env.get_env_time() for env in self.envs]
      )
      self._actor_dones = np.hstack(actor_dones)
      self._actor_ids = actor_ids
  
      return obs, rewards, env_dones, infos
  
file_path: maze/maze/train/parallelization/vector_env/sequential_vector_env.py
imports: from typing import List, Callable, Iterable, Any, Tuple, Dict, Optional
  import numpy
  from maze.core.annotations import override
  from maze.core.env.action_conversion import ActionType
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.log_stats.log_stats import LogStatsLevel
  from maze.core.wrappers.log_stats_wrapper import LogStatsWrapper
  from maze.train.parallelization.vector_env.structured_vector_env import StructuredVectorEnv
  from maze.train.parallelization.vector_env.vector_env import VectorEnv
  from maze.train.utils.train_utils import stack_numpy_dict_list, unstack_numpy_list_dict
label_desc: Use image node_id 2 for calling the SequentialVectorEnv obj's underlying member method code with example usage: obj.step(actions) and returns: obs,  rewards,  env_dones,  infos