code: def test_vector_env_info(asynchronous):
      env = gym.vector.make(
          ENV_ID,
          num_envs=NUM_ENVS,
          asynchronous=asynchronous,
          disable_env_checker=True,
      )
      env.reset(seed=SEED)
      for _ in range(ENV_STEPS):
          env.action_space.seed(SEED)
          action = env.action_space.sample()
          _, _, terminateds, truncateds, infos = env.step(action)
          if any(terminateds) or any(truncateds):
              assert len(infos["final_observation"]) == NUM_ENVS
              assert len(infos["_final_observation"]) == NUM_ENVS
  
              assert isinstance(infos["final_observation"], np.ndarray)
              assert isinstance(infos["_final_observation"], np.ndarray)
  
              for i, (terminated, truncated) in enumerate(
                  zip(terminateds, truncateds)
              ):
                  if terminated or truncated:
                      assert infos["_final_observation"][i]
                  else:
                      assert not infos["_final_observation"][i]
                      assert infos["final_observation"][i] is None
  
imports: import numpy
  import pytest
  import gym
  from gym.vector.sync_vector_env import SyncVectorEnv
  from tests.vector.utils import make_env
label_desc: Use image node_id 1 for calling a global function with example usage: test_vector_env_info(asynchronous) without return types