code: def testInvalidGradients(self, multi_actions, gae_lambda):
      self._setUp_a2c_loss(
          multi_actions=multi_actions, gae_lambda=gae_lambda
      )
      ins = nest.flatten(
          [
              self._actions,
              self._rewards,
              self._pcontinues,
              self._bootstrap_value,
          ]
      )
      outs = [None] * len(ins)
  
      self.assertAllEqual(
          tf.gradients(self._extra.discounted_returns, ins), outs
      )
      self.assertAllEqual(
          tf.gradients(self._extra.policy_gradient_loss, ins), outs
      )
      self.assertAllEqual(
          tf.gradients(self._extra.entropy_loss, ins), outs
      )
      self.assertAllEqual(
          tf.gradients(self._extra.baseline_loss, ins), outs
      )
      self.assertAllEqual(tf.gradients(self._loss, ins), outs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from six.moves import xrange
  import tensorflow.compat.v1
  import tensorflow_probability
  import tree
  from trfl import policy_gradient_ops
label_desc: Use image node_id 4 for calling the SequenceA2CLossTest obj's underlying member method code with example usage: obj.testInvalidGradients(multi_actions, gae_lambda) without return types