class_docstr: Stores multi-agent episode data.
  
  The central attribute of the class is the timestep mapping
  `global_t_to_local_t` that maps the global (environment)
  timestep to the local (agent) timesteps.
  
  The `MultiAgentEpisode` is based on the `SingleAgentEpisode`s
  for each agent, stored in `MultiAgentEpisode.agent_episodes`.
class_docstr_tok: ["Stores","multi-agent","episode","data",".","The","central","attribute","of","the","class","is","the","timestep","mapping","`","global_t_to_local_t","`","that","maps","the","global","(","environment",")","timestep","to","the","local","(","agent",")","timesteps",".","The","`","MultiAgentEpisode","`","is","based","on","the","`","SingleAgentEpisode","`","s","for","each","agent",",","stored","in","`","MultiAgentEpisode.agent_episodes","`","."]
docstr: Returns the length of an `MultiAgentEpisode`.
  
  Note that the length of an episode is defined by the difference
  between its actual timestep and the starting point.
  
  Returns: An integer defining the length of the episode or an
      error if the episode has not yet started.
code: def __len__(self):
      """Returns the length of an `MultiAgentEpisode`.
  
      Note that the length of an episode is defined by the difference
      between its actual timestep and the starting point.
  
      Returns: An integer defining the length of the episode or an
          error if the episode has not yet started.
      """
      assert (
          sum(
              len(agent_map)
              for agent_map in self.global_t_to_local_t.values()
          )
          > 0
      ), (
          "ERROR: Cannot determine length of episode that hasn't started, yet!"
          "Call `MultiAgentEpisode.add_env_reset(observations=)` "
          "first (after which `len(MultiAgentEpisode)` will be 0)."
      )
      return self.t - self.t_started
  
imports: from collections import defaultdict
  from queue import Queue
  from typing import Any, Dict, List, Optional, Set, Union
  import uuid
  import numpy
  from ray.rllib.env.single_agent_episode import SingleAgentEpisode
  from ray.rllib.policy.sample_batch import MultiAgentBatch
  from ray.rllib.utils.typing import MultiAgentDict
label_desc: Use image node_id 27 for calling the MultiAgentEpisode obj's underlying member method code with example usage: obj.__len__() and returns: unknown