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: Whether the episode is actually done (terminated or truncated).
  
  A done episode cannot be continued via `self.add_env_step()` or being
  concatenated on its right-side with another episode chunk or being
  succeeded via `self.cut()`.
  
  Note that in a multi-agent environment this does not necessarily
  correspond to single agents having terminated or being truncated.
  
  `self.is_terminated` should be `True`, if all agents are terminated and
  `self.is_truncated` should be `True`, if all agents are truncated. If
  only one or more (but not all!) agents are `terminated/truncated the
  `MultiAgentEpisode.is_terminated/is_truncated` should be `False`. This
  information about single agent's terminated/truncated states can always
  be retrieved from the `SingleAgentEpisode`s inside the 'MultiAgentEpisode`
  one.
  
  If all agents are either terminated or truncated, but in a mixed fashion,
  i.e. some are terminated and others are truncated: This is currently
  undefined and could potentially be a problem (if a user really implemented
  such a multi-agent env that behaves this way).
  
  Returns:
      Boolean defining if an episode has either terminated or truncated.
code: def is_done(self):
      """Whether the episode is actually done (terminated or truncated).
  
      A done episode cannot be continued via `self.add_env_step()` or being
      concatenated on its right-side with another episode chunk or being
      succeeded via `self.cut()`.
  
      Note that in a multi-agent environment this does not necessarily
      correspond to single agents having terminated or being truncated.
  
      `self.is_terminated` should be `True`, if all agents are terminated and
      `self.is_truncated` should be `True`, if all agents are truncated. If
      only one or more (but not all!) agents are `terminated/truncated the
      `MultiAgentEpisode.is_terminated/is_truncated` should be `False`. This
      information about single agent's terminated/truncated states can always
      be retrieved from the `SingleAgentEpisode`s inside the 'MultiAgentEpisode`
      one.
  
      If all agents are either terminated or truncated, but in a mixed fashion,
      i.e. some are terminated and others are truncated: This is currently
      undefined and could potentially be a problem (if a user really implemented
      such a multi-agent env that behaves this way).
  
      Returns:
          Boolean defining if an episode has either terminated or truncated.
      """
      return self.is_terminated or self.is_truncated
  
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 13 for calling the MultiAgentEpisode obj's underlying member method code with example usage: obj.is_done() and returns: unknown