class_docstr: The LevelManager is in charge of managing a level in the hierarchy of control. Each level can have one or more
  CompositeAgents and an environment to control. Its API is double-folded:
      1. Expose services of a LevelManager such as training the level, or stepping it (while behaving according to a
         LevelBehaviorScheme, e.g. as SelfPlay between two identical agents). These methods are implemented in the
         LevelManagerLogic class.
      2. Disguise as appearing as an environment to the upper level control so it will believe it is interacting with
         an environment. This includes stepping through what appears to be a regular environment, setting its phase
         or resetting it. These methods are implemented directly in LevelManager as it inherits from
         EnvironmentInterface.
docstr: Change the phase of the level manager and all the hierarchy levels below it
  :param val: the new phase
  :return: None
docstr_tok: ["Change","the","phase","of","the","level","manager","and","all","the","hierarchy","levels","below","it",":","param","val",":","the","new","phase",":","return",":","None"]
code: def phase(self, val: RunPhase):
      """
      Change the phase of the level manager and all the hierarchy levels below it
      :param val: the new phase
      :return: None
      """
      self._phase = val
      for agent in self.agents.values():
          agent.phase = val
  
imports: import copy
  from typing import Union, Dict
  from rl_coach.agents.composite_agent import CompositeAgent
  from rl_coach.agents.agent_interface import AgentInterface
  from rl_coach.core_types import EnvResponse, ActionInfo, RunPhase, ActionType, EnvironmentSteps, Transition
  from rl_coach.environments.environment import Environment
  from rl_coach.environments.environment_interface import EnvironmentInterface
  from rl_coach.saver import SaverCollection
  from rl_coach.spaces import ActionSpace, SpacesDefinition
label_desc: Use image node_id 12 for calling the LevelManager obj's underlying member method code with example usage: obj.phase(val) without return types