docstr: Ensure that observations and rewards change in consecutive calls.
docstr_tok: ["Ensure","that","observations","and","rewards","change","in","consecutive","calls","."]
code: def testObservationAndRewardsVary(
      self, observation_shape, action_shape, batch_size, seed
  ):
      """Ensure that observations and rewards change in consecutive calls."""
      tf.compat.v1.set_random_seed(seed)
      env = get_gaussian_random_environment(
          observation_shape, action_shape, batch_size
      )
  
      observation0 = env.reset().observation
      reward0 = env.step(tf.zeros([batch_size] + action_shape)).reward
      observation0 = self.evaluate(observation0)
      reward0 = self.evaluate(reward0)
  
      observation1 = env.reset().observation
      reward1 = env.step(tf.zeros([batch_size] + action_shape)).reward
      self.evaluate(observation1)
      self.evaluate(reward1)
  
      self.assertNotAllClose(observation0, observation1)
      self.assertNotAllClose(reward0, reward1)
  
file_path: agents/tf_agents/bandits/environments/random_bandit_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 random_bandit_environment
  from tf_agents.specs import tensor_spec
label_desc: Use image node_id 6 for calling the RandomBanditEnvironmentTest obj's underlying member method code with example usage: obj.testObservationAndRewardsVary(observation_shape, action_shape, batch_size, seed) without return types