code: def testGeneratesActions(self):
      action_spec = [
          array_spec.BoundedArraySpec((2, 3), np.int32, -10, 10),
          array_spec.BoundedArraySpec((1, 2), np.int32, -10, 10),
      ]
      policy = random_py_policy.RandomPyPolicy(
          time_step_spec=self._time_step_spec, action_spec=action_spec
      )
  
      action_step = policy.action(self._time_step)
      tf.nest.assert_same_structure(action_spec, action_step.action)
  
      self.assertTrue(np.all(action_step.action[0] >= -10))
      self.assertTrue(np.all(action_step.action[0] <= 10))
      self.assertTrue(np.all(action_step.action[1] >= -10))
      self.assertTrue(np.all(action_step.action[1] <= 10))
  
file_path: agents/tf_agents/policies/random_py_policy_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from tf_agents.policies import random_py_policy
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 2 for calling the RandomPyPolicyTest obj's underlying member method code with example usage: obj.testGeneratesActions() without return types