code: def testGradientsTotalLoss(self, multi_actions):
      self._setUp_a2c_loss(multi_actions=multi_actions)
      loss = self._loss
  
      gradient = tf.gradients(loss, self._baseline_values)[0]
      self.assertEqual(
          gradient.get_shape(), self._baseline_values.get_shape()
      )
  
      for policy_var in nest.flatten(self._policy_vars):
          gradient = tf.gradients(loss, policy_var)[0]
          self.assertEqual(gradient.get_shape(), policy_var.get_shape())
  
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 8 for calling the SequenceA2CLossTest obj's underlying member method code with example usage: obj.testGradientsTotalLoss(multi_actions) without return types