docstr: Tests the module-level function generalized_lambda_returns.
code: def testGeneralizedLambdaReturns(self, lambda_):
      """Tests the module-level function generalized_lambda_returns."""
  
      # Sequence length 2, batch size 1.
      state_values = tf.constant([[0.2], [0.3]], dtype=tf.float32)
      rewards = tf.constant([[0.4], [0.5]], dtype=tf.float32)
      pcontinues = tf.constant([[0.9], [0.8]], dtype=tf.float32)
      bootstrap_value = tf.constant([0.1], dtype=tf.float32)
  
      discounted_returns = value_ops.generalized_lambda_returns(
          rewards, pcontinues, state_values, bootstrap_value, lambda_
      )
  
      # Manually calculate the discounted returns.
      return1 = 0.5 + 0.8 * 0.1
      return0 = 0.4 + 0.9 * (lambda_ * return1 + (1 - lambda_) * 0.3)
  
      with self.test_session() as sess:
          self.assertAllClose(
              sess.run(discounted_returns), [[return0], [return1]]
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow.compat.v1
  import tree
  from trfl import value_ops
label_desc: Use image node_id 1 for calling the GeneralizedLambdaReturnsTest obj's underlying member method code with example usage: obj.testGeneralizedLambdaReturns(lambda_) without return types