class_docstr: The `actor` (policy net) of DreamerV3.
  
  Consists of a simple MLP for Discrete actions and two MLPs for cont. actions (mean
  and stddev).
  Also contains two scalar variables to keep track of the percentile-5 and
  percentile-95 values of the computed value targets within a batch. This is used to
  compute the "scaled value targets" for actor learning. These two variables decay
  over time exponentially (see [1] for more details).
docstr: Helper method to create an action distribution object from (T, B, ..) params.
  
  Args:
      action_dist_params_T_B: The time-major action distribution parameters.
          This could be simply the logits (discrete) or a to-be-split-in-2
          tensor for mean and stddev (continuous).
  
  Returns:
      The tfp action distribution object, from which one can sample, compute
      log probs, entropy, etc..
code: def get_action_dist_object(self, action_dist_params_T_B):
      """Helper method to create an action distribution object from (T, B, ..) params.
  
      Args:
          action_dist_params_T_B: The time-major action distribution parameters.
              This could be simply the logits (discrete) or a to-be-split-in-2
              tensor for mean and stddev (continuous).
  
      Returns:
          The tfp action distribution object, from which one can sample, compute
          log probs, entropy, etc..
      """
      if isinstance(self.action_space, gym.spaces.Discrete):
          # Create the distribution object using the unimix'd logits.
          distr = tfp.distributions.OneHotCategorical(
              logits=action_dist_params_T_B,
              dtype=tf.float32,
          )
  
      elif isinstance(self.action_space, gym.spaces.Box):
          # Compute Normal distribution from action_logits and std_logits
          loc, scale = tf.split(action_dist_params_T_B, 2, axis=-1)
          distr = tfp.distributions.Normal(loc=loc, scale=scale)
  
          # If action_space is a box with multiple dims, make individual dims
          # independent.
          distr = tfp.distributions.Independent(
              distr, len(self.action_space.shape)
          )
  
      else:
          raise ValueError(
              f"Action space {self.action_space} not supported!"
          )
  
      return distr
  
file_path: ray/python/ray/rllib/algorithms/dreamerv3/tf/models/actor_network.py
imports: from typing import Optional
  import gymnasium
  from gymnasium.spaces import Box, Discrete
  import numpy
  from ray.rllib.algorithms.dreamerv3.tf.models.components.mlp import MLP
  from ray.rllib.algorithms.dreamerv3.utils import get_gru_units, get_num_z_categoricals, get_num_z_classes
  from ray.rllib.utils.framework import try_import_tf, try_import_tfp
label_desc: Use image node_id 3 for calling the ActorNetwork obj's underlying member method code with example usage: obj.get_action_dist_object(action_dist_params_T_B) and returns: distr