code: def test_check_spaces_sync_vector_env():
      # 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 = SyncVectorEnv(env_fns)
          env.close()
  
file_path: gym/tests/vector/test_sync_vector_env.py
imports: import numpy
  import pytest
  from gym.envs.registration import EnvSpec
  from gym.spaces import Box, Discrete, MultiDiscrete, Tuple
  from gym.vector.sync_vector_env import SyncVectorEnv
  from tests.envs.utils import all_testing_env_specs
  from tests.vector.utils import CustomSpace, assert_rng_equal, make_custom_space_env, make_env
label_desc: Use image node_id 6 for calling a global function with example usage: test_check_spaces_sync_vector_env() without return types