code: def testAssertOnNoCallOfComputeGradients(self, cls):
      dp_sum_query = gaussian_query.GaussianSumQuery(1.0e9, 0.0)
      opt = cls(dp_sum_query, num_microbatches=1, learning_rate=1.0)
  
      with self.assertRaises(AssertionError):
          grads_and_vars = tf.Variable([0.0])
          opt.apply_gradients(grads_and_vars)
  
      # Expect no exception if compute_gradients is called.
      var0 = tf.Variable([0.0])
      data0 = tf.Variable([[0.0]])
      grads_and_vars = opt.compute_gradients(
          self._loss(data0, var0), [var0]
      )
      opt.apply_gradients(grads_and_vars)
  
imports: import os
  import unittest
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow.compat.v1 import estimator
  from tensorflow_privacy.privacy.dp_query import gaussian_query
  from tensorflow_privacy.privacy.optimizers import dp_optimizer
label_desc: Use image node_id 12 for calling the DPOptimizerTest obj's underlying member method code with example usage: obj.testAssertOnNoCallOfComputeGradients(cls) without return types