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: Stores initial observation.
  
  Args:
      observations: A dictionary mapping agent ids to initial observations.
          Note that some agents may not have an initial observation.
      infos: A dictionary mapping agent ids to initial info dicts.
          Note that some agents may not have an initial info dict.
      render_image: An RGB uint8 image from rendering the environment.
code: def add_env_reset(
      self,
      *,
      observations: MultiAgentDict,
      infos: Optional[MultiAgentDict] = None,
      render_image: Optional[np.ndarray] = None,
  ) -> None:
      """Stores initial observation.
  
      Args:
          observations: A dictionary mapping agent ids to initial observations.
              Note that some agents may not have an initial observation.
          infos: A dictionary mapping agent ids to initial info dicts.
              Note that some agents may not have an initial info dict.
          render_image: An RGB uint8 image from rendering the environment.
      """
      assert not self.is_done
      # Assume that this episode is completely empty and has not stepped yet.
      # Leave self.t (and self.t_started) at 0.
      assert self.t == self.t_started == 0
      infos = infos or {}
  
      # TODO (simon): After clearing with sven for initialization of timesteps
      # this might be removed.
      if len(self.global_t_to_local_t) == 0:
          self.global_t_to_local_t = {
              agent_id: _IndexMapping() for agent_id in self._agent_ids
          }
  
      # Note that we store the render images into the `MultiAgentEpisode`
      # instead into each `SingleAgentEpisode`.
      if render_image is not None:
          self.render_images.append(render_image)
  
      # Note, all agents will have an initial observation.
      for agent_id in observations.keys():
          # Add initial timestep for each agent to the timestep mapping.
          self.global_t_to_local_t[agent_id].append(self.t)
          # Add initial observations to the agent's episode.
          self.agent_episodes[agent_id].add_env_reset(
              # Note, initial observation has to be provided.
              observation=observations[agent_id],
              infos=infos.get(agent_id),
          )
  
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 11 for calling the MultiAgentEpisode obj's underlying member method code with example usage: obj.add_env_reset() without return types