code: def test_single_agent_env(self):
      ev = RolloutWorker(
          env_creator=lambda _: MockEnv3(NUM_STEPS),
          default_policy_class=EchoPolicy,
          config=AlgorithmConfig().rollouts(
              enable_connectors=True,
              num_rollout_workers=0,
          ),
      )
      sample_batch = ev.sample()
      self.assertEqual(sample_batch.count, 200)
      # EnvRunnerV2 always returns MultiAgentBatch, even for single-agent envs.
      for agent_id, sample_batch in sample_batch.policy_batches.items():
          # A batch of 100. 4 episodes, each 25.
          self.assertEqual(len(set(sample_batch["eps_id"])), 8)
  
imports: import unittest
  import ray
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig
  from ray.rllib.env.multi_agent_env import MultiAgentEnv
  from ray.rllib.evaluation.rollout_worker import RolloutWorker
  from ray.rllib.examples.env.mock_env import MockEnv3
  from ray.rllib.policy import Policy
  from ray.rllib.utils import override
label_desc: Use image node_id 3 for calling the TestEpisodeV2 obj's underlying member method code with example usage: obj.test_single_agent_env() without return types