docs: def percentile(arr, percent):
      """
      Calculate the given percentile of arr.
      """
      arr = sorted(arr)
      index = (len(arr) - 1) * percent
      floor = math.floor(index)
      ceil = math.ceil(index)
      if floor == ceil:
          return arr[int(index)]
      low_value = arr[int(floor)] * (ceil - index)
      high_value = arr[int(ceil)] * (index - floor)
      return low_value + high_value