class_docstr: Tests for get_gradient method.
  
  Since get_gradients must run in graph mode, the method is tested within
  the Estimator framework.
class_docstr_tok: ["Tests","for","get_gradient","method",".","Since","get_gradients","must","run","in","graph","mode",",","the","method","is","tested","within","the","Estimator","framework","."]
docstr: Tests that assertion fails when DP gradients are not computed.
code: def testRaisesOnNoCallOfGetGradients(self):
      """Tests that assertion fails when DP gradients are not computed."""
      grads_and_vars = tf.Variable([0.0])
      optimizer = dp_optimizer_keras.DPFTRLTreeAggregationOptimizer(
          l2_norm_clip=100.0,
          noise_multiplier=0.0,
          num_microbatches=1,
          var_list_or_model=[grads_and_vars],
          restart_period=None,
          restart_warmup=None,
          learning_rate=2.0,
      )
  
      with self.assertRaises(AssertionError):
          optimizer.apply_gradients(grads_and_vars)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras_vectorized
label_desc: Use image node_id 3 for calling the DPTreeAggregationGetGradientsTest obj's underlying member method code with example usage: obj.testRaisesOnNoCallOfGetGradients() without return types