code: def test_vector_env_info_concurrent_termination(concurrent_ends):
      # envs that need to terminate together will have the same action
      actions = [0] * concurrent_ends + [1] * (
          NUM_ENVS - concurrent_ends
      )
      envs = [make_env(ENV_ID, SEED) for _ in range(NUM_ENVS)]
      envs = SyncVectorEnv(envs)
  
      for _ in range(ENV_STEPS):
          _, _, terminateds, truncateds, infos = envs.step(actions)
          if any(terminateds) or any(truncateds):
              for i, (terminated, truncated) in enumerate(
                  zip(terminateds, truncateds)
              ):
                  if i < concurrent_ends:
                      assert terminated or truncated
                      assert infos["_final_observation"][i]
                  else:
                      assert not infos["_final_observation"][i]
                      assert infos["final_observation"][i] is None
              return
  
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 2 for calling a global function with example usage: test_vector_env_info_concurrent_termination(concurrent_ends) without return types