code: def __init__(
      self,
      agent_parameters,
      parent: Union["LevelManager", "CompositeAgent"] = None,
  ):
      super().__init__(agent_parameters, parent)
  
      self.policy_gradient_rescaler = None
      if hasattr(self.ap.algorithm, "policy_gradient_rescaler"):
          self.policy_gradient_rescaler = (
              self.ap.algorithm.policy_gradient_rescaler
          )
  
      # statistics for variance reduction
      self.last_gradient_update_step_idx = 0
      self.max_episode_length = 100000
      self.mean_return_over_multiple_episodes = np.zeros(
          self.max_episode_length
      )
      self.num_episodes_where_step_has_been_seen = np.zeros(
          self.max_episode_length
      )
      self.entropy = self.register_signal("Entropy")
  
file_path: coach/rl_coach/agents/policy_optimization_agent.py
imports: from collections import OrderedDict
  from enum import Enum
  from typing import Union
  import numpy
  from rl_coach.agents.agent import Agent
  from rl_coach.core_types import Batch, ActionInfo
  from rl_coach.logger import screen
  from rl_coach.spaces import DiscreteActionSpace, BoxActionSpace
  from rl_coach.utils import eps
label_desc: Use image node_id 1 to create a new PolicyOptimizationAgent object from inherited base classes: Agent with example: obj = PolicyOptimizationAgent(agent_parameters, parent)