code: def testRun(self):
      t, b = 3, 2
      policies, actions, entropy_scale_op = _setup_pgops_mock(
          sequence_length=t, batch_size=b, num_policies=3
      )
      baseline_values = tf.constant(
          np.arange(-3, 3).reshape((t, b)), dtype=tf.float32
      )
      rewards = tf.constant(
          np.arange(-2, 4).reshape((t, b)), dtype=tf.float32
      )
      pcontinues = tf.ones(shape=(t, b), dtype=tf.float32)
      bootstrap_value = tf.constant([-2.0, 4.0], dtype=tf.float32)
      self._loss, self._extra = pg_ops.sequence_a2c_loss(
          policies=policies,
          baseline_values=baseline_values,
          actions=actions,
          rewards=rewards,
          pcontinues=pcontinues,
          bootstrap_value=bootstrap_value,
          entropy_cost=0.5,
          baseline_cost=2.0,
          entropy_scale_op=entropy_scale_op,
      )
  
      with self.test_session() as sess:
          # Expected values are from manual calculation in a Colab.
          self.assertAllEqual(
              sess.run(self._extra.baseline_loss), [3.0, 170.0]
          )
          self.assertAllEqual(
              sess.run(self._extra.policy_gradient_loss), [12.0, -348.0]
          )
          self.assertAllEqual(
              sess.run(self._extra.entropy_loss), [-126.0, -189.0]
          )
          self.assertAllEqual(sess.run(self._loss), [-111.0, -367.0])
  
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 9 for calling the SequenceA2CLossTest obj's underlying member method code with example usage: obj.testRun() without return types