code: def _percentile(self, values, percent, key=lambda x: x):
          
          vals = sorted(values)
          k = (len(vals) - 1) * (percent / 100)
          f = math.floor(k)
          c = math.ceil(k)
          if f == c:
              return key(vals[int(k)])
          d0 = key(vals[int(f)]) * (c - k)
          d1 = key(vals[int(c)]) * (k - f)
          return d0 + d1
docs: Find the percentile of a list of values.
  
          Args:
              values: A list of values for which percentiles are desired
              percent: A float value from 0 to 100 representing the requested percentile.
              key: optional key function to compute value from each element of N.
  
          Return:
              The percentile of the values