code: def testTimeStepSpec(self, batch_py_env, isolation):
      py_env = self._get_py_env(batch_py_env, isolation)
      tf_env = tf_py_environment.TFPyEnvironment(
          py_env, isolation=isolation
      )
      spec = tf_env.time_step_spec()
  
      # step_type
      self.assertEqual(type(spec.step_type), specs.TensorSpec)
      self.assertEqual(spec.step_type.dtype, tf.int32)
      self.assertEqual(spec.step_type.shape, tf.TensorShape([]))
  
      # reward
      self.assertEqual(type(spec.reward), specs.TensorSpec)
      self.assertEqual(spec.reward.dtype, tf.float32)
      self.assertEqual(spec.reward.shape, tf.TensorShape([]))
  
      # discount
      self.assertEqual(type(spec.discount), specs.BoundedTensorSpec)
      self.assertEqual(spec.discount.dtype, tf.float32)
      self.assertEqual(spec.discount.shape, tf.TensorShape([]))
      self.assertEqual(spec.discount.minimum, 0.0)
      self.assertEqual(spec.discount.maximum, 1.0)
  
      # observation
      self.assertEqual(type(spec.observation), specs.TensorSpec)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import threading
  from typing import Text
  from absl.testing import parameterized
  from absl.testing.absltest import mock
  import numpy
  import tensorflow
  from tf_agents import specs
  from tf_agents.environments import batched_py_environment
  from tf_agents.environments import py_environment
  from tf_agents.environments import suite_gym
  from tf_agents.environments import tf_py_environment
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
label_desc: Use image node_id 6 for calling the TFPYEnvironmentTest obj's underlying member method code with example usage: obj.testTimeStepSpec(batch_py_env, isolation) without return types