code: def testActionDistribution(self):
      actor_network = (
          actor_distribution_network.ActorDistributionNetwork(
              self._obs_spec, self._action_spec, fc_layer_params=(2, 1)
          )
      )
      policy = actor_policy.ActorPolicy(
          self._time_step_spec,
          self._action_spec,
          actor_network=actor_network,
      )
  
      # Force creation of variables before global_variables_initializer.
      policy.variables()
      self.evaluate(tf.compat.v1.global_variables_initializer())
  
      distribution = policy.distribution(self._time_step_batch)
      actions_ = self.evaluate(distribution.action.sample())
      self.assertTrue(np.all(actions_ >= self._action_spec.minimum))
      self.assertTrue(np.all(actions_ <= self._action_spec.maximum))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.networks import actor_distribution_network
  from tf_agents.networks import network
  from tf_agents.policies import actor_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 6 for calling the ActorPolicyDiscreteActionsTest obj's underlying member method code with example usage: obj.testActionDistribution() without return types