code: def test_adaptation_clip_noise(self):
      sample_num, tolerance, stddev = 1000, 0.3, 0.1
      initial_clip, expected_num_records = 5.0, 2.0
      record1 = tf.constant(1.0)
      record2 = tf.constant(10.0)
  
      query = quantile_adaptive_clip_tree_query.QAdaClipTreeResSumQuery(
          initial_l2_norm_clip=initial_clip,
          noise_multiplier=0.0,
          record_specs=tf.TensorSpec([]),
          target_unclipped_quantile=0.5,
          learning_rate=1.0,
          clipped_count_stddev=stddev,
          expected_num_records=expected_num_records,
          geometric_update=False,
          noise_seed=1,
      )
  
      global_state = query.initial_global_state()
      samples = []
      for _ in range(sample_num):
          noised_results, global_state = test_utils.run_query(
              query, [record1, record2], global_state
          )
          samples.append(noised_results.numpy())
          global_state = query.reset_state(noised_results, global_state)
          self.assertNotEqual(
              global_state.quantile_estimator_state.current_estimate,
              initial_clip,
          )
          # Force to use the same clip norm for noise estimation
          quantile_estimator_state = (
              global_state.quantile_estimator_state._replace(
                  current_estimate=initial_clip
              )
          )
          global_state = global_state._replace(
              quantile_estimator_state=quantile_estimator_state
          )
  
      # The sum result is 1. (unclipped) + 5. (clipped) = 6.
      self.assertAllClose(np.mean(samples), 6.0, atol=4 * stddev)
      self.assertAllClose(
          np.std(samples), stddev / expected_num_records, rtol=tolerance
      )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import quantile_adaptive_clip_tree_query
  from tensorflow_privacy.privacy.dp_query import test_utils
label_desc: Use image node_id 15 for calling the QAdaClipTreeResSumQueryTest obj's underlying member method code with example usage: obj.test_adaptation_clip_noise() without return types