def METHOD_NAME(env: BatchedVecEnv | NonBatchedVecEnv, cfg: Config) -> EnvInfo:
    obs_space = env.observation_space
    action_space = env.action_space
    num_agents = env.num_agents
    gpu_actions = cfg.env_gpu_actions
    gpu_observations = cfg.env_gpu_observations
    frameskip = cfg.env_frameskip
    reward_shaping_scheme = get_default_reward_shaping(env)
    action_splits = None
    all_discrete = None
    if isinstance(action_space, gym.spaces.Tuple):
        action_splits = [calc_num_actions(space) for space in action_space]
        all_discrete = all(isinstance(space, gym.spaces.Discrete) for space in action_space)
    env_info = EnvInfo(
        obs_space=obs_space,
        action_space=action_space,
        num_agents=num_agents,
        gpu_actions=gpu_actions,
        gpu_observations=gpu_observations,
        action_splits=action_splits,
        all_discrete=all_discrete,
        frameskip=frameskip,
        reward_shaping_scheme=reward_shaping_scheme,
        env_info_protocol_version=ENV_INFO_PROTOCOL_VERSION,
    )
    return env_info