code: def testPyPolicyIsBatchedTrue(self):
      action_dims = 5
      observation_dims = 3
      batch_size = 2
      array_action_spec = array_spec.BoundedArraySpec(
          (action_dims,), np.int32, -10, 10
      )
      observation_spec = array_spec.ArraySpec(
          (observation_dims,), np.float32
      )
      array_time_step_spec = ts.time_step_spec(observation_spec)
  
      observation = tf.ones([batch_size, observation_dims], tf.float32)
      time_step = ts.restart(observation, batch_size=batch_size)
  
      tf_py_random_policy = tf_py_policy.TFPyPolicy(
          random_py_policy.RandomPyPolicy(
              time_step_spec=array_time_step_spec,
              action_spec=array_action_spec,
          ),
          py_policy_is_batched=True,
      )
  
      action_step = tf_py_random_policy.action(time_step=time_step)
      action = self.evaluate(action_step.action)
  
      self.assertEqual(action.shape, (batch_size, action_dims))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing.absltest import mock
  import numpy
  import tensorflow
  from tf_agents.policies import py_policy
  from tf_agents.policies import random_py_policy
  from tf_agents.policies import tf_py_policy
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  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 TFPyPolicyTest obj's underlying member method code with example usage: obj.testPyPolicyIsBatchedTrue() without return types