class_docstr: Vectorized environment that runs multiple environments in parallel.
  
  It uses ``multiprocessing`` processes, and pipes for communication.
  
  Example::
  
      >>> import gym
      >>> env = gym.vector.AsyncVectorEnv([
      ...     lambda: gym.make("Pendulum-v0", g=9.81),
      ...     lambda: gym.make("Pendulum-v0", g=1.62)
      ... ])
      >>> env.reset()
      array([[-0.8286432 ,  0.5597771 ,  0.90249056],
             [-0.85009176,  0.5266346 ,  0.60007906]], dtype=float32)
class_docstr_tok: ["Vectorized","environment","that","runs","multiple","environments","in","parallel",".","It","uses","``","multiprocessing","``","processes",",","and","pipes","for","communication",".","Example",":",":",">",">",">","import","gym",">",">",">","env","=","gym.vector.AsyncVectorEnv","(","[","...","lambda",":","gym.make","(","``","Pendulum-v0","''",",","g=9.81",")",",","...","lambda",":","gym.make","(","``","Pendulum-v0","''",",","g=1.62",")","...","]",")",">",">",">","env.reset","(",")","array","(","[","[","-0.8286432",",","0.5597771",",","0.90249056","]",",","[","-0.85009176",",","0.5266346",",","0.60007906","]","]",",","dtype=float32",")"]
code: def _raise_if_errors(self, successes):
      if all(successes):
          return
  
      num_errors = self.num_envs - sum(successes)
      assert num_errors > 0
      for i in range(num_errors):
          index, exctype, value = self.error_queue.get()
          logger.error(
              f"Received the following error from Worker-{index}: {exctype.__name__}: {value}"
          )
          logger.error(f"Shutting down Worker-{index}.")
          self.parent_pipes[index].close()
          self.parent_pipes[index] = None
  
          if i == num_errors - 1:
              logger.error(
                  "Raising the last exception back to the main process."
              )
              raise exctype(value)
  
imports: import multiprocessing
  import sys
  import time
  from copy import deepcopy
  from enum import Enum
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import gym
  from gym import logger
  from gym.core import ObsType
  from gym.error import AlreadyPendingCallError, ClosedEnvironmentError, CustomSpaceError, NoAsyncCallError
  from gym.vector.utils import CloudpickleWrapper, clear_mpi_env_vars, concatenate, create_empty_array, create_shared_memory, iterate, read_from_shared_memory, write_to_shared_memory
  from gym.vector.vector_env import VectorEnv
label_desc: Use image node_id 13 for calling the AsyncVectorEnv obj's underlying member method code with example usage: obj._raise_if_errors(successes) without return types