class_docstr: An environment that hosts multiple independent agents.
  
  Agents are identified by (string) agent ids. Note that these "agents" here
  are not to be confused with RLlib Algorithms, which are also sometimes
  referred to as "agents" or "RL agents".
  
  The preferred format for action- and observation space is a mapping from agent
  ids to their individual spaces. If that is not provided, the respective methods'
  observation_space_contains(), action_space_contains(),
  action_space_sample() and observation_space_sample() have to be overwritten.
class_docstr_tok: ["An","environment","that","hosts","multiple","independent","agents",".","Agents","are","identified","by","(","string",")","agent","ids",".","Note","that","these","``","agents","''","here","are","not","to","be","confused","with","RLlib","Algorithms",",","which","are","also","sometimes","referred","to","as","``","agents","''","or","``","RL","agents","''",".","The","preferred","format","for","action-","and","observation","space","is","a","mapping","from","agent","ids","to","their","individual","spaces",".","If","that","is","not","provided",",","the","respective","methods'","observation_space_contains","(",")",",","action_space_contains","(",")",",","action_space_sample","(",")","and","observation_space_sample","(",")","have","to","be","overwritten","."]
docstr: Checks if the action space contains the given action.
  
  Args:
      x: Actions to check.
  
  Returns:
      True if the action space contains all actions in x.
docstr_tok: ["Checks","if","the","action","space","contains","the","given","action",".","Args",":","x",":","Actions","to","check",".","Returns",":","True","if","the","action","space","contains","all","actions","in","x","."]
code: def action_space_contains(self, x: MultiAgentDict) -> bool:
      """Checks if the action space contains the given action.
  
      Args:
          x: Actions to check.
  
      Returns:
          True if the action space contains all actions in x.
      """
      if (
          not hasattr(self, "_action_space_in_preferred_format")
          or self._action_space_in_preferred_format is None
      ):
          self._action_space_in_preferred_format = (
              self._check_if_action_space_maps_agent_id_to_sub_space()
          )
      if self._action_space_in_preferred_format:
          return all(
              self.action_space[agent].contains(x[agent]) for agent in x
          )
  
      if log_once("action_space_contains"):
          logger.warning(
              "action_space_contains() of {} has not been implemented. "
              "You "
              "can either implement it yourself or bring the observation "
              "space into the preferred format of a mapping from agent ids "
              "to their individual observation spaces. ".format(self)
          )
      return True
  
imports: import gymnasium
  import logging
  from typing import Callable, Dict, List, Tuple, Optional, Union, Set, Type
  from ray.rllib.env.base_env import BaseEnv
  from ray.rllib.env.env_context import EnvContext
  from ray.rllib.utils.annotations import ExperimentalAPI, override, PublicAPI, DeveloperAPI
  from ray.rllib.utils.typing import AgentID, EnvCreator, EnvID, EnvType, MultiAgentDict, MultiEnvDict
  from ray.util import log_once
label_desc: Use image node_id 5 for calling the MultiAgentEnv obj's underlying member method code with example usage: obj.action_space_contains(x) and returns: True, all