def _binary_search(increasing_list, value):
    """ Helper function for binary search in a list of increasing values
    """
    left = 0
    right = len(increasing_list) - 2

    while left < right:
        pivot = (left + right) // 2
        if increasing_list[pivot + 1] >= value:
            right = pivot
        else:
            left = pivot + 1

    return left