class_docstr: This is the multi-agent version of ExternalEnv.
class_docstr_tok: ["This","is","the","multi-agent","version","of","ExternalEnv","."]
docstr: Initializes an ExternalMultiAgentEnv instance.
  
  Args:
      action_space: Action space of the env.
      observation_space: Observation space of the env.
docstr_tok: ["Initializes","an","ExternalMultiAgentEnv","instance",".","Args",":","action_space",":","Action","space","of","the","env",".","observation_space",":","Observation","space","of","the","env","."]
code: def __init__(
      self,
      action_space: gym.Space,
      observation_space: gym.Space,
  ):
      """Initializes an ExternalMultiAgentEnv instance.
  
      Args:
          action_space: Action space of the env.
          observation_space: Observation space of the env.
      """
      ExternalEnv.__init__(self, action_space, observation_space)
  
      # We require to know all agents' spaces.
      if isinstance(self.action_space, dict) or isinstance(
          self.observation_space, dict
      ):
          if not (
              self.action_space.keys() == self.observation_space.keys()
          ):
              raise ValueError(
                  "Agent ids disagree for action space and obs "
                  "space dict: {} {}".format(
                      self.action_space.keys(),
                      self.observation_space.keys(),
                  )
              )
  
file_path: ray/python/ray/rllib/env/external_multi_agent_env.py
imports: import uuid
  import gymnasium
  from typing import Optional
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.env.external_env import ExternalEnv, _ExternalEnvEpisode
  from ray.rllib.utils.typing import MultiAgentDict
label_desc: Use image node_id 1 to create a new ExternalMultiAgentEnv object from inherited base classes: ExternalEnv with example: obj = ExternalMultiAgentEnv(action_space, observation_space)