code: def test_multiple_episodes():
      max_steps, batch_size, grid_size = 20, 100, 3
      n_steps = int(max_steps * 8.25)
      envs = init_several_env(max_steps, batch_size, grid_size)
  
      for env in envs:
          obs, info = env.reset()
          check_obs(obs, batch_size, grid_size)
          assert_logger_buffer_size(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 _ in range(batch_size)
                  ]
                  for policy_id in env.players_ids
              }
              obs, reward, done, truncated, info = env.step(actions)
              check_obs(obs, batch_size, grid_size)
              assert_logger_buffer_size(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, batch_size, grid_size)
                  assert_logger_buffer_size(env, n_steps=0)
                  step_i = 0
  
imports: import copy
  import random
  import numpy
  from ray.rllib.examples.env.coin_game_vectorized_env import VectorizedCoinGame, AsymVectorizedCoinGame
  from ray.rllib.examples.env.tests.test_coin_game_non_vectorized_env import assert_obs_is_symmetrical
label_desc: Use image node_id 8 for calling a global function with example usage: test_multiple_episodes() without return types