code: def test_check_spaces_async_vector_env(shared_memory):
      # CartPole-v1 - observation_space: Box(4,), action_space: Discrete(2)
      env_fns = [make_env("CartPole-v1", i) for i in range(8)]
      # FrozenLake-v1 - Discrete(16), action_space: Discrete(4)
      env_fns[1] = make_env("FrozenLake-v1", 1)
      with pytest.raises(RuntimeError):
          env = AsyncVectorEnv(env_fns, shared_memory=shared_memory)
          env.close(terminate=True)
  
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 13 for calling a global function with example usage: test_check_spaces_async_vector_env(shared_memory) without return types