class_docstr: Internal wrapper to translate any gym.Envs into a VectorEnv object.
class_docstr_tok: ["Internal","wrapper","to","translate","any","gym.Envs","into","a","VectorEnv","object","."]
code: def vector_step(
      self, actions: List[EnvActionType]
  ) -> Tuple[
      List[EnvObsType],
      List[float],
      List[bool],
      List[bool],
      List[EnvInfoDict],
  ]:
      (
          obs_batch,
          reward_batch,
          terminated_batch,
          truncated_batch,
          info_batch,
      ) = (
          [],
          [],
          [],
          [],
          [],
      )
      for i in range(self.num_envs):
          try:
              results = self.envs[i].step(actions[i])
          except Exception as e:
              if self.restart_failed_sub_environments:
                  logger.exception(e.args[0])
                  self.restart_at(i)
                  results = e, 0.0, True, True, {}
              else:
                  raise e
  
          obs, reward, terminated, truncated, info = results
  
          if not isinstance(info, dict):
              raise ValueError(
                  "Info should be a dict, got {} ({})".format(
                      info, type(info)
                  )
              )
          obs_batch.append(obs)
          reward_batch.append(reward)
          terminated_batch.append(terminated)
          truncated_batch.append(truncated)
          info_batch.append(info)
      return (
          obs_batch,
          reward_batch,
          terminated_batch,
          truncated_batch,
          info_batch,
      )
  
imports: import logging
  import gymnasium
  import numpy
  from typing import Callable, List, Optional, Tuple, Union, Set
  from ray.rllib.env.base_env import BaseEnv, _DUMMY_AGENT_ID
  from ray.rllib.utils.annotations import Deprecated, override, PublicAPI
  from ray.rllib.utils.typing import EnvActionType, EnvID, EnvInfoDict, EnvObsType, EnvType, MultiEnvDict, AgentID
  from ray.util import log_once
label_desc: Use image node_id 5 for calling the _VectorizedGymEnv obj's underlying member method code with example usage: obj.vector_step(actions) and returns: obs_batch,  reward_batch,  terminated_batch,  truncated_batch,  info_batch