code: def test_all_equal(self, exact, start_low, geometric, tree):
      # 20 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 = _make_quantile_estimator_query(
          initial_estimate=(1.0 if start_low else 10.0),
          target_quantile=0.5,
          learning_rate=learning_rate,
          below_estimate_stddev=(0.0 if exact else 1e-2),
          expected_num_records=(None if exact else num_records),
          geometric_update=geometric,
          tree_aggregation=tree,
      )
  
      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_estimate = global_state.current_estimate
  
          if t > 40:
              self.assertNear(actual_estimate, 5.0, 0.5)
  
file_path: privacy/tensorflow_privacy/privacy/dp_query/quantile_estimator_query_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import quantile_estimator_query
  from tensorflow_privacy.privacy.dp_query import test_utils
label_desc: Use image node_id 6 for calling the QuantileEstimatorQueryTest obj's underlying member method code with example usage: obj.test_all_equal(exact, start_low, geometric, tree) without return types