code: def test_target_one_geometric(self, exact, tree):
      record1 = tf.constant(1.5)
      record2 = tf.constant(3.0)
  
      query = _make_quantile_estimator_query(
          initial_estimate=0.5,
          target_quantile=1.0,
          learning_rate=np.log(2.0),  # Geometric steps in powers of 2.
          below_estimate_stddev=0.0,
          expected_num_records=(None if exact else 2.0),
          geometric_update=True,
          tree_aggregation=tree,
      )
  
      global_state = query.initial_global_state()
  
      initial_estimate = global_state.current_estimate
      self.assertAllClose(initial_estimate, 0.5)
  
      # On the first two iterations, both are above, so the estimate is doubled.
      # When the estimate reaches 2.0, only one record is above, so the estimate
      # is multiplied by sqrt(2.0). Still only one is above so it increases to
      # 4.0. Now both records are above, and the estimate stays there (at 4.0).
  
      two_times_root_two = 2 * np.sqrt(2.0)  # approx 2.828
  
      expected_estimates = [1.0, 2.0, two_times_root_two, 4.0, 4.0]
      for expected_estimate in expected_estimates:
          actual_estimate, global_state = test_utils.run_query(
              query, [record1, record2], global_state
          )
  
          self.assertAllClose(
              actual_estimate.numpy(), expected_estimate
          )
  
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 4 for calling the QuantileEstimatorQueryTest obj's underlying member method code with example usage: obj.test_target_one_geometric(exact, tree) without return types