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","."]
code: def testLargeBatchEmulation(self, gradient_accumulation_steps):
      # Uses clipping and noise, thus does not test specific values
      # of the variables and only tests how often variables are updated.
      var0 = tf.Variable([[1.0, 2.0]], dtype=tf.float32)
      var1 = tf.Variable([3.0], dtype=tf.float32)
      x = tf.constant([[2.0, 0.0], [0.0, 1.0]], dtype=tf.float32)
      loss = lambda: tf.matmul(var0, x, transpose_b=True) + var1
      variables = [var0, var1]
  
      optimizer = dp_optimizer_keras.DPFTRLTreeAggregationOptimizer(
          l2_norm_clip=100.0,
          noise_multiplier=0.0,
          gradient_accumulation_steps=gradient_accumulation_steps,
          var_list_or_model=variables,
          restart_period=None,
          restart_warmup=None,
          learning_rate=1.0,
      )
  
      for _ in range(gradient_accumulation_steps):
          self.assertAllCloseAccordingToType([[1.0, 2.0]], var0)
          self.assertAllCloseAccordingToType([3.0], var1)
          optimizer.minimize(loss, variables)
  
      self.assertNotAllClose([[1.0, 2.0]], var0)
      self.assertNotAllClose([3.0], var1)
  
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 5 for calling the DPTreeAggregationGetGradientsTest obj's underlying member method code with example usage: obj.testLargeBatchEmulation(gradient_accumulation_steps) without return types