code: def test_adaptation_all_equal(self, start_low, geometric):
      # `num_records` equal records. Test that we converge to that record and
      # bounce around it. Unlike the linspace test, the quantile-matching
      # objective is very sharp at the optimum so a decaying learning rate is
      # necessary.
      num_records = 20
      records = [tf.constant(5.0)] * num_records
  
      learning_rate = tf.Variable(1.0)
  
      query = (
          quantile_adaptive_clip_sum_query.QuantileAdaptiveClipSumQuery(
              initial_l2_norm_clip=(1.0 if start_low else 10.0),
              noise_multiplier=0.0,
              target_unclipped_quantile=0.5,
              learning_rate=learning_rate,
              clipped_count_stddev=0.0,
              expected_num_records=num_records,
              geometric_update=geometric,
          )
      )
  
      global_state = query.initial_global_state()
  
      for t in range(50):
          tf.compat.v1.assign(learning_rate, 1.0 / np.sqrt(t + 1))
          _, global_state = test_utils.run_query(
              query, records, global_state
          )
  
          actual_clip = global_state.sum_state.l2_norm_clip
  
          if t > 40:
              self.assertNear(actual_clip, 5.0, 0.5)
  
file_path: privacy/tensorflow_privacy/privacy/dp_query/quantile_adaptive_clip_sum_query_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import quantile_adaptive_clip_sum_query
  from tensorflow_privacy.privacy.dp_query import test_utils
label_desc: Use image node_id 9 for calling the QuantileAdaptiveClipSumQueryTest obj's underlying member method code with example usage: obj.test_adaptation_all_equal(start_low, geometric) without return types