code: def choose_action(self, curr_state):
      # top level decides, for each of his generated sub-goals, for all the layers beneath him if this is a sub-goal
      # testing phase
  
      graph_manager = self.parent_level_manager.parent_graph_manager
      if self.ap.is_a_highest_level_agent:
          graph_manager.should_test_current_sub_goal = (
              np.random.rand() < self.sub_goal_testing_rate
          )
  
      if self.phase == RunPhase.TRAIN:
          if graph_manager.should_test_current_sub_goal:
              self.exploration_policy.change_phase(RunPhase.TEST)
          else:
              self.exploration_policy.change_phase(self.phase)
  
      action_info = super().choose_action(curr_state)
      return action_info
  
file_path: coach/rl_coach/agents/hac_ddpg_agent.py
imports: from typing import Union
  import numpy
  from rl_coach.agents.ddpg_agent import DDPGAgent, DDPGAgentParameters, DDPGAlgorithmParameters
  from rl_coach.core_types import RunPhase
  from rl_coach.spaces import SpacesDefinition
label_desc: Use image node_id 2 for calling the HACDDPGAgent obj's underlying member method code with example usage: obj.choose_action(curr_state) and returns: action_info