How to calculate quantile from histogram bucket metrics

@Nathan_Reese This works fine if the bytes are not aggregated already. But in my case, input is already bucketed.

In my case, le is buckets(10, 25, 50, 100, 500, 1000, 5000 ms) and value fields is aggregated value for each bucket.

Prometheus supports percentile calculation for already bucket aggregated data using histogram_quantile function
https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile