code: def set_environment_parameters(self, spaces: SpacesDefinition):
      super().set_environment_parameters(spaces)
  
      if self.ap.is_a_highest_level_agent:
          # the rest of the levels already have an in_action_space set to be of type GoalsSpace, thus they will have
          # their GoalsSpace set to the in_action_space in agent.set_environment_parameters()
          self.spaces.goal = self.spaces.action
          self.spaces.goal.set_target_space(
              self.spaces.state[self.spaces.goal.goal_name]
          )
  
      if not self.ap.is_a_highest_level_agent:
          self.spaces.reward.reward_success_threshold = (
              self.spaces.goal.reward_type.goal_reaching_reward
          )
  
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 4 for calling the HACDDPGAgent obj's underlying member method code with example usage: obj.set_environment_parameters(spaces) without return types