code: def test_step_sync_vector_env(use_single_action_space):
      env_fns = [make_env("FrozenLake-v1", i) for i in range(8)]
  
      env = SyncVectorEnv(env_fns)
      observations = env.reset()
  
      assert isinstance(env.single_action_space, Discrete)
      assert isinstance(env.action_space, MultiDiscrete)
  
      if use_single_action_space:
          actions = [env.single_action_space.sample() for _ in range(8)]
      else:
          actions = env.action_space.sample()
      observations, rewards, terminateds, truncateds, _ = env.step(
          actions
      )
  
      env.close()
  
      assert isinstance(env.observation_space, MultiDiscrete)
      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(rewards, np.ndarray)
      assert isinstance(rewards[0], (float, np.floating))
      assert rewards.ndim == 1
      assert rewards.size == 8
  
      assert isinstance(terminateds, np.ndarray)
      assert terminateds.dtype == np.bool_
      assert terminateds.ndim == 1
      assert terminateds.size == 8
  
      assert isinstance(truncateds, np.ndarray)
      assert truncateds.dtype == np.bool_
      assert truncateds.ndim == 1
      assert truncateds.size == 8
  
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 3 for calling a global function with example usage: test_step_sync_vector_env(use_single_action_space) without return types