def METHOD_NAME():
    """Test RecordVideo used as env of SyncVectorEnv."""
    envs = gym.vector.SyncVectorEnv(
        [make_env("CartPole-v1", i, render_mode="rgb_array") for i in range(2)]
    )
    envs = gym.wrappers.RecordEpisodeStatistics(envs)
    envs.reset()
    for i in range(199):
        _, _, _, _, infos = envs.step(envs.action_space.sample())
    assert os.path.isdir("videos")
    mp4_files = [file for file in os.listdir("videos") if file.endswith(".mp4")]
    assert len(mp4_files) == 2
    shutil.rmtree("videos")