code: def choose_action(self, curr_state):
      if self.should_get_softmax_probabilities:
          (
              actions_q_values,
              softmax_probabilities,
          ) = self.get_all_q_values_for_states_and_softmax_probabilities(
              curr_state
          )
      else:
          actions_q_values = self.get_all_q_values_for_states(
              curr_state
          )
  
      # choose action according to the exploration policy and the current phase (evaluating or training the agent)
      action, action_probabilities = self.exploration_policy.get_action(
          actions_q_values
      )
      if (
          self.should_get_softmax_probabilities
          and softmax_probabilities is not None
      ):
          # override the exploration policy's generated probabilities when an action was taken
          # with the agent's actual policy
          action_probabilities = softmax_probabilities
  
      self._validate_action(self.exploration_policy, action)
  
      if actions_q_values is not None:
          # this is for bootstrapped dqn
          if (
              type(actions_q_values) == list
              and len(actions_q_values) > 0
          ):
              actions_q_values = (
                  self.exploration_policy.last_action_values
              )
  
          # store the q values statistics for logging
          self.q_values.add_sample(actions_q_values)
  
          actions_q_values = actions_q_values.squeeze()
          action_probabilities = action_probabilities.squeeze()
  
          for i, q_value in enumerate(actions_q_values):
              self.q_value_for_action[i].add_sample(q_value)
  
          action_info = ActionInfo(
              action=action,
              action_value=actions_q_values[action],
              max_action_value=np.max(actions_q_values),
              all_action_probabilities=action_probabilities,
          )
  
      else:
          action_info = ActionInfo(
              action=action,
              all_action_probabilities=action_probabilities,
          )
  
      return action_info
  
imports: from collections import OrderedDict
  from typing import Union, List
  import numpy
  from rl_coach.agents.agent import Agent
  from rl_coach.core_types import ActionInfo, StateType, Batch
  from rl_coach.filters.filter import NoInputFilter
  from rl_coach.logger import screen
  from rl_coach.memories.non_episodic.prioritized_experience_replay import PrioritizedExperienceReplay
  from rl_coach.spaces import DiscreteActionSpace
  from copy import deepcopy, copy
label_desc: Use image node_id 8 for calling the ValueOptimizationAgent obj's underlying member method code with example usage: obj.choose_action(curr_state) and returns: action_info