code: def testOneStepNestedRewards(self):
      py_env = PYEnvironmentMockNestedRewards()
      tf_env = tf_py_environment.TFPyEnvironment(py_env)
      time_step = tf_env.current_time_step()
      with tf.control_dependencies([time_step.step_type]):
          action = tf.constant([1])
      time_step = self.evaluate(tf_env.step(action))
  
      self.assertAllEqual([ts.StepType.MID], time_step.step_type)
      self.assertAllEqual([1.0], time_step.reward["reward"])
      self.assertAllEqual([2.0], time_step.reward["constraint"])
      self.assertAllEqual([1.0], time_step.discount)
      self.assertAllEqual([1], time_step.observation)
  
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 17 for calling the TFPYEnvironmentTest obj's underlying member method code with example usage: obj.testOneStepNestedRewards() without return types