class_docstr: `DPQuery` for Gaussian sum queries with adaptive clipping.
  
  Clipping norm is tuned adaptively to converge to a value such that a specified
  quantile of updates are clipped, using the algorithm of Andrew et al. (
  https://arxiv.org/abs/1905.03871). See the paper for details and suggested
  hyperparameter settings.
class_docstr_tok: ["`","DPQuery","`","for","Gaussian","sum","queries","with","adaptive","clipping",".","Clipping","norm","is","tuned","adaptively","to","converge","to","a","value","such","that","a","specified","quantile","of","updates","are","clipped",",","using","the","algorithm","of","Andrew","et","al",".","(","https",":","\/\/arxiv.org\/abs\/1905.03871",")",".","See","the","paper","for","details","and","suggested","hyperparameter","settings","."]
docstr: Implements `tensorflow_privacy.DPQuery.get_noised_result`.
docstr_tok: ["Implements","`","tensorflow_privacy.DPQuery.get_noised_result","`","."]
code: def get_noised_result(self, sample_state, global_state):
      """Implements `tensorflow_privacy.DPQuery.get_noised_result`."""
      (
          noised_vectors,
          sum_state,
          sum_event,
      ) = self._sum_query.get_noised_result(
          sample_state.sum_state, global_state.sum_state
      )
      del sum_state  # To be set explicitly later when we know the new clip.
  
      (
          new_l2_norm_clip,
          new_quantile_estimator_state,
          quantile_event,
      ) = self._quantile_estimator_query.get_noised_result(
          sample_state.quantile_estimator_state,
          global_state.quantile_estimator_state,
      )
  
      new_l2_norm_clip = tf.maximum(new_l2_norm_clip, 0.0)
      new_sum_stddev = new_l2_norm_clip * global_state.noise_multiplier
      new_sum_query_state = self._sum_query.make_global_state(
          l2_norm_clip=new_l2_norm_clip, stddev=new_sum_stddev
      )
  
      new_global_state = self._GlobalState(
          global_state.noise_multiplier,
          new_sum_query_state,
          new_quantile_estimator_state,
      )
  
      event = dp_accounting.ComposedDpEvent(
          events=[sum_event, quantile_event]
      )
      return noised_vectors, new_global_state, event
  
file_path: privacy/tensorflow_privacy/privacy/dp_query/quantile_adaptive_clip_sum_query.py
imports: import collections
  import dp_accounting
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import dp_query
  from tensorflow_privacy.privacy.dp_query import gaussian_query
  from tensorflow_privacy.privacy.dp_query import quantile_estimator_query
label_desc: Use image node_id 6 for calling the QuantileAdaptiveClipSumQuery obj's underlying member method code with example usage: obj.get_noised_result(sample_state, global_state) and returns: noised_vectors,  new_global_state,  event