class_docstr: A compound stat that reports one or more percentiles
class_docstr_tok: ["A","compound","stat","that","reports","one","or","more","percentiles"]
code: def value(self, config, now, quantile):
      self.purge_obsolete_samples(config, now)
      count = sum(sample.event_count for sample in self._samples)
      if count == 0.0:
          return float("NaN")
      sum_val = 0.0
      quant = float(quantile)
      for b in range(self._buckets):
          for sample in self._samples:
              assert type(sample) is self.HistogramSample
              hist = sample.histogram.counts
              sum_val += hist[b]
              if sum_val / count > quant:
                  return self._bin_scheme.from_bin(b)
      return float("inf")
  
file_path: kafka-python/kafka/metrics/stats/percentiles.py
imports: from __future__ import absolute_import
  from kafka.metrics import AnonMeasurable, NamedMeasurable
  from kafka.metrics.compound_stat import AbstractCompoundStat
  from kafka.metrics.stats import Histogram
  from kafka.metrics.stats.sampled_stat import AbstractSampledStat
label_desc: Use image node_id 3 for calling the Percentiles obj's underlying member method code with example usage: obj.value(config, now, quantile) and returns: float, float, self