code: def testAutoReset(self):
      obs_spec = array_spec.BoundedArraySpec((1,), np.int32)
      action_spec = array_spec.BoundedArraySpec((1,), np.int32)
  
      random_env = random_py_environment.RandomPyEnvironment(
          observation_spec=obs_spec, action_spec=action_spec
      )
  
      time_step = random_env.reset()
      while not time_step.is_last():
          time_step = random_env.step(action=np.ones((1,)))
      # End of episode
      self.assertTrue(time_step.is_last())
      # Automatic reset
      time_step = random_env.step(action=np.ones((1,)))
      self.assertTrue(time_step.is_first())
  
file_path: agents/tf_agents/environments/py_environment_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from tf_agents.environments import random_py_environment
  from tf_agents.specs import array_spec
label_desc: Use image node_id 3 for calling the PyEnvironmentTest obj's underlying member method code with example usage: obj.testAutoReset() without return types