def percentile_(data, percentile):
    """Calculates the given percentile of the object with linear interpolation"""
    sorted_data = sorted(data)
    i = percentile * (len(data) - 1)
    floor = int(i // 1)
    frac = i % 1
    return sorted_data[floor] + (sorted_data[floor + 1] - sorted_data[floor]) * frac