code: def __init__(
      self,
      agent_parameters,
      parent: Union["LevelManager", "CompositeAgent"] = None,
  ):
      super().__init__(agent_parameters, parent)
      self.returns_mean = self.register_signal("Returns Mean")
      self.returns_variance = self.register_signal("Returns Variance")
      self.last_gradient_update_step_idx = 0
  
imports: from typing import Union
  import numpy
  from rl_coach.agents.policy_optimization_agent import PolicyOptimizationAgent, PolicyGradientRescaler
  from rl_coach.architectures.embedder_parameters import InputEmbedderParameters
  from rl_coach.architectures.head_parameters import PolicyHeadParameters
  from rl_coach.architectures.middleware_parameters import FCMiddlewareParameters
  from rl_coach.base_parameters import NetworkParameters, AlgorithmParameters, AgentParameters
  from rl_coach.exploration_policies.additive_noise import AdditiveNoiseParameters
  from rl_coach.exploration_policies.categorical import CategoricalParameters
  from rl_coach.logger import screen
  from rl_coach.memories.episodic.single_episode_buffer import SingleEpisodeBufferParameters
  from rl_coach.spaces import DiscreteActionSpace, BoxActionSpace
label_desc: Use image node_id 1 to create a new PolicyGradientsAgent object from inherited base classes: PolicyOptimizationAgent with example: obj = PolicyGradientsAgent(agent_parameters, parent)