code: def testZeroState(self):
      policy_state_length = 5
      batch_size = 3
      mock_py_policy = mock.create_autospec(py_policy.PyPolicy)
      observation_spec = array_spec.ArraySpec((3,), np.float32)
      mock_py_policy.time_step_spec = ts.time_step_spec(
          observation_spec
      )
      mock_py_policy.action_spec = array_spec.BoundedArraySpec(
          (7,), np.int32, 1, 1
      )
      py_policy_state_spec = array_spec.BoundedArraySpec(
          (policy_state_length,), np.int32, 1, 1
      )
      # Make the mock policy and reset return value.
      mock_py_policy.policy_state_spec = py_policy_state_spec
      mock_py_policy.info_spec = ()
  
      expected_py_policy_state = np.zeros(
          [batch_size] + list(py_policy_state_spec.shape),
          py_policy_state_spec.dtype,
      )
      mock_py_policy.get_initial_state.return_value = (
          expected_py_policy_state
      )
  
      tf_mock_py_policy = tf_py_policy.TFPyPolicy(mock_py_policy)
      initial_state = tf_mock_py_policy.get_initial_state(
          batch_size=batch_size
      )
      initial_state_ = self.evaluate(initial_state)
  
      self.assertEqual(1, mock_py_policy.get_initial_state.call_count)
      np.testing.assert_equal(initial_state_, expected_py_policy_state)
  
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 3 for calling the TFPyPolicyTest obj's underlying member method code with example usage: obj.testZeroState() without return types