docstr: Tests a MultiAgentEnv (gymnasium.Env subclass) that uses the old API.
docstr_tok: ["Tests","a","MultiAgentEnv","(","gymnasium.Env","subclass",")","that","uses","the","old","API","."]
code: def test_multi_agent_gymnasium_old_api_manually_wrapped(self):
      """Tests a MultiAgentEnv (gymnasium.Env subclass) that uses the old API."""
  
      register_env(
          "test",
          lambda env_ctx: MultiAgentEnvCompatibility(
              MultiAgentGymnasiumOldAPI(env_ctx)
          ),
      )
  
      algo = (
          PPOConfig()
          .environment(
              "test",
              auto_wrap_old_gym_envs=False,
              disable_env_checking=True,
          )
          # Speeds the test up.
          .rollouts(num_rollout_workers=0)
          .build()
      )
      algo.train()
      algo.stop()
  
imports: import unittest
  import ray
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.env.multi_agent_env import MultiAgentEnv
  from ray.rllib.env.wrappers.multi_agent_env_compatibility import MultiAgentEnvCompatibility
  from ray.rllib.utils.gym import try_import_gymnasium_and_gym
  from ray.tune.registry import register_env
label_desc: Use image node_id 11 for calling the TestGymEnvAPIs obj's underlying member method code with example usage: obj.test_multi_agent_gymnasium_old_api_manually_wrapped() without return types