code: def choose_action(self, curr_state):
      # convert to batch so we can run it through the network
      action_values = self.get_prediction(curr_state)
      if isinstance(self.spaces.action, DiscreteActionSpace):
          # DISCRETE
          action_probabilities = np.array(action_values).squeeze()
          action, _ = self.exploration_policy.get_action(
              action_probabilities
          )
          action_info = ActionInfo(
              action=action,
              all_action_probabilities=action_probabilities,
          )
  
          self.entropy.add_sample(
              -np.sum(
                  action_probabilities
                  * np.log(action_probabilities + eps)
              )
          )
      elif isinstance(self.spaces.action, BoxActionSpace):
          # CONTINUOUS
          action = self.exploration_policy.get_action(action_values)
  
          action_info = ActionInfo(action=action)
      else:
          raise ValueError(
              "The action space of the environment is not compatible with the algorithm"
          )
      return action_info
  
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 7 for calling the PolicyOptimizationAgent obj's underlying member method code with example usage: obj.choose_action(curr_state) and returns: action_info