class_docstr: Wraps a MultiAgentEnv environment with agents grouped as specified.
  
  See multi_agent_env.py for the specification of groups.
  
  This API is experimental.
class_docstr_tok: ["Wraps","a","MultiAgentEnv","environment","with","agents","grouped","as","specified",".","See","multi_agent_env.py","for","the","specification","of","groups",".","This","API","is","experimental","."]
code: def _ungroup_items(self, items):
      out = {}
      for agent_id, value in items.items():
          if agent_id in self.groups:
              assert len(value) == len(self.groups[agent_id]), (
                  agent_id,
                  value,
                  self.groups,
              )
              for a, v in zip(self.groups[agent_id], value):
                  out[a] = v
          else:
              out[agent_id] = value
      return out
  
file_path: ray/rllib/env/wrappers/group_agents_wrapper.py
imports: from collections import OrderedDict
  import gymnasium
  from typing import Dict, List, Optional
  from ray.rllib.env.multi_agent_env import MultiAgentEnv
  from ray.rllib.utils.annotations import DeveloperAPI
  from ray.rllib.utils.typing import AgentID
label_desc: Use image node_id 4 for calling the GroupAgentsWrapper obj's underlying member method code with example usage: obj._ungroup_items(items) and returns: out