code: def test_reset_async_vector_env(shared_memory):
      env_fns = [make_env("CartPole-v1", i) for i in range(8)]
  
      env = AsyncVectorEnv(env_fns, shared_memory=shared_memory)
      observations, infos = env.reset()
  
      env.close()
  
      assert isinstance(env.observation_space, Box)
      assert isinstance(observations, np.ndarray)
      assert observations.dtype == env.observation_space.dtype
      assert (
          observations.shape
          == (8,) + env.single_observation_space.shape
      )
      assert observations.shape == env.observation_space.shape
  
      try:
          env = AsyncVectorEnv(env_fns, shared_memory=shared_memory)
          observations, infos = env.reset()
      finally:
          env.close()
  
      assert isinstance(env.observation_space, Box)
      assert isinstance(observations, np.ndarray)
      assert observations.dtype == env.observation_space.dtype
      assert (
          observations.shape
          == (8,) + env.single_observation_space.shape
      )
      assert observations.shape == env.observation_space.shape
      assert isinstance(infos, dict)
      assert all([isinstance(info, dict) for info in infos])
  
imports: import re
  from multiprocessing import TimeoutError
  import numpy
  import pytest
  from gym.error import AlreadyPendingCallError, ClosedEnvironmentError, NoAsyncCallError
  from gym.spaces import Box, Discrete, MultiDiscrete, Tuple
  from gym.vector.async_vector_env import AsyncVectorEnv
  from tests.vector.utils import CustomSpace, make_custom_space_env, make_env, make_slow_env
label_desc: Use image node_id 2 for calling a global function with example usage: test_reset_async_vector_env(shared_memory) without return types