code: def testEmitLogProbability(self, dtype):
      action_spec = [
          tensor_spec.BoundedTensorSpec((2, 3), dtype, -10, 10),
          tensor_spec.BoundedTensorSpec((1, 2), dtype, -10, 10),
      ]
      time_step_spec, time_step = self.create_time_step()
      batch_size = 3
      time_step = self.create_batch(time_step, batch_size)
  
      policy = random_tf_policy.RandomTFPolicy(
          time_step_spec=time_step_spec,
          action_spec=action_spec,
          emit_log_probability=True,
      )
  
      action_step = policy.action(time_step)
      tf.nest.assert_same_structure(action_spec, action_step.action)
  
      step = self.evaluate(action_step)
      action_ = step.action
      # For integer specs, boundaries are inclusive.
      p = 1.0 / 21 if dtype.is_integer else 1.0 / 20
      np.testing.assert_allclose(
          np.array(step.info.log_probability, dtype=np.float32),
          np.array(
              np.log(
                  [
                      [math.pow(p, 6) for _ in range(3)],
                      [math.pow(p, 2) for _ in range(3)],
                  ]
              ),
              dtype=np.float32,
          ),
          rtol=1e-5,
      )
      self.assertTrue(np.all(action_[0] >= -10))
      self.assertTrue(np.all(action_[0] <= 10))
      self.assertTrue(np.all(action_[1] >= -10))
      self.assertTrue(np.all(action_[1] <= 10))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import random_tf_policy
  from tf_agents.policies import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import nest_utils
  from tf_agents.utils import test_utils
label_desc: Use image node_id 6 for calling the RandomTFPolicyTest obj's underlying member method code with example usage: obj.testEmitLogProbability(dtype) without return types