code: def test_env_runner_output(self):
      # Test if we can produce RolloutMetrics just by stepping
      config = (
          PPOConfig()
          .environment("basic_multiagent")
          .framework("torch")
          .training(
              # Specifically ask for a batch of 200 samples.
              train_batch_size=200,
          )
          .rollouts(
              num_envs_per_worker=1,
              num_rollout_workers=0,
              # Enable EnvRunnerV2.
              enable_connectors=True,
          )
          .multi_agent(
              policies={
                  "one": PolicySpec(
                      policy_class=RandomPolicy,
                  ),
                  "two": PolicySpec(
                      policy_class=RandomPolicy,
                  ),
              },
              policy_mapping_fn=lambda *args, **kwargs: self.mapper.map(),
              policies_to_train=["one"],
              count_steps_by="agent_steps",
          )
          .rl_module(
              rl_module_spec=MultiAgentRLModuleSpec(
                  module_specs={
                      "one": SingleAgentRLModuleSpec(
                          module_class=RandomRLModule
                      ),
                      "two": SingleAgentRLModuleSpec(
                          module_class=RandomRLModule
                      ),
                  }
              ),
          )
      )
  
      algo = PPO(config)
  
      local_worker = algo.workers.local_worker()
  
      env_runner = local_worker.sampler._env_runner_obj
  
      outputs = []
      while not outputs:
          outputs = env_runner.step()
  
      self.assertEqual(len(outputs), 1)
      self.assertTrue(len(list(outputs[0].agent_rewards.keys())) == 2)
  
imports: import unittest
  import numpy
  import ray
  from ray.rllib.algorithms.callbacks import DefaultCallbacks
  from ray.rllib.algorithms.ppo import PPO, PPOConfig
  from ray.rllib.connectors.connector import ActionConnector, ConnectorContext
  from ray.rllib.evaluation.metrics import RolloutMetrics
  from ray.rllib.examples.env.debug_counter_env import DebugCounterEnv
  from ray.rllib.examples.env.multi_agent import BasicMultiAgent, GuessTheNumberGame
  from ray.rllib.examples.policy.random_policy import RandomPolicy
  from ray.rllib.policy.policy import PolicySpec
  from ray.tune import register_env
  from ray.rllib.policy.sample_batch import convert_ma_batch_to_sample_batch
  from ray.rllib.core.rl_module.rl_module import SingleAgentRLModuleSpec
  from ray.rllib.core.rl_module.marl_module import MultiAgentRLModuleSpec
  from ray.rllib.examples.rl_module.random_rl_module import RandomRLModule
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 9 for calling the TestEnvRunnerV2 obj's underlying member method code with example usage: obj.test_env_runner_output() without return types