class_docstr: Single-agent gym-like environment based on a multi-agent environment for which
  all but one agent has been fixed.
class_docstr_tok: ["Single-agent","gym-like","environment","based","on","a","multi-agent","environment","for","which","all","but","one","agent","has","been","fixed","."]
code: def __init__(self, env: PartialMultiAgentEnv):
      assert (
          len(env.agent_names) == 1
      ), f"Too many remaining agents: {self.agent_names}"
      self.env = env.copy()
      self.env.reset()
      self.observation_space = env.observation_space
      self.action_space = env.action_space
      self._agent_name = env.agent_names[0]
      self.env = env
  
imports: import typing
  from collections import defaultdict
  import gym
label_desc: Use image node_id 1 to create a new SingleAgentEnv object from inherited base classes: gym with example: obj = SingleAgentEnv(env)