code: def test_multiple_episodes():
      max_steps = 20
      env_all = [init_env(max_steps, env_class) for env_class in ENVS]
      n_steps = int(max_steps * 8.25)
  
      for env in env_all:
          obs, info = env.reset()
          check_obs(obs, env)
          assert_logger_buffer_size_two_players(env, n_steps=0)
  
          step_i = 0
          for _ in range(n_steps):
              step_i += 1
              actions = {
                  policy_id: random.randint(0, env.NUM_ACTIONS - 1)
                  for policy_id in env.players_ids
              }
              obs, reward, done, truncated, info = env.step(actions)
              check_obs(obs, env)
              assert_logger_buffer_size_two_players(env, n_steps=step_i)
              assert not done["__all__"] or (
                  step_i == max_steps and done["__all__"]
              )
              if done["__all__"]:
                  obs, info = env.reset()
                  check_obs(obs, env)
                  step_i = 0
  
file_path: ray/rllib/examples/env/tests/test_matrix_sequential_social_dilemma.py
imports: import random
  from ray.rllib.examples.env.matrix_sequential_social_dilemma import IteratedPrisonersDilemma, IteratedChicken, IteratedStagHunt, IteratedBoS
label_desc: Use image node_id 7 for calling a global function with example usage: test_multiple_episodes() without return types