docstr: Ensure that `observation_to_reward` does not change with zero drift.
docstr_tok: ["Ensure","that","`","observation_to_reward","`","does","not","change","with","zero","drift","."]
code: def testObservationToRewardsDoesNotVary(
      self, observation_shape, action_shape, batch_size, seed
  ):
      """Ensure that `observation_to_reward` does not change with zero drift."""
      tf.compat.v1.set_random_seed(seed)
      env = get_deterministic_gaussian_non_stationary_environment(
          observation_shape,
          action_shape,
          batch_size,
          drift_mean=0.0,
          drift_scale=0.0,
      )
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
  
      (
          observation_to_reward_samples,
          additive_reward_samples,
      ) = self.run_environment_steps_helper(
          env, batch_size, num_steps=10
      )
  
      for t in range(1, 10):
          self.assertAllClose(
              observation_to_reward_samples[t - 1],
              observation_to_reward_samples[t],
          )
          # The additive reward should change in every step.
          self.assertNotAllClose(
              additive_reward_samples[t - 1], additive_reward_samples[t]
          )
  
file_path: agents/tf_agents/bandits/environments/drifting_linear_environment_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.environments import drifting_linear_environment
label_desc: Use image node_id 2 for calling the DriftingLinearEnvironmentTest obj's underlying member method code with example usage: obj.testObservationToRewardsDoesNotVary(observation_shape, action_shape, batch_size, seed) without return types