def find_interval_index(array, low, high, search_value):
    """
        Finds the position index that the search_value should be inserted in the array.

        Parameters
        ----------
        array : list
            The array for searching where to insert the search_value. <b>Must be sorted.</b>
        low : int
            The low index of the interval that we are going to search in the array.
        high : int
            The max index of the interval that we are going to search in the array.
        search_value : float
            The value for which we search to find where it should be inserted.

        Returns
        -------
        int
            The index that should be the search_value inserted in the array.
    """
    while low < high:
        mid = int((high+low)//2)
        if array[mid] == search_value:
            break
        elif array[mid] > search_value:
            high = mid - 1
        else:
            low = mid + 1

    mid = int((high+low)//2)
    if search_value <= array[mid]:
        return mid

    return mid + 1