def get_threshold_multiplier(total_nobs, nob_limits, multiplier_values):
    """
    Find the highest value of i such that total_nobs is greater 
    than nob_limits[i] and return multiplier_values[i]
    
    :param total_nobs: total number of neighbour observations
    :param nob_limits: list containing the limiting numbers of observations in 
                       ascending order first element must be zero
    :param multiplier_values: list containing the multiplier values associated.
    :type total_nobs: integer
    :type nob_limits: List[integer]
    :type multiplier_values: List[float]
    :return: the multiplier value
    :rtype: float
    
    This routine is used by the buddy check. It's a bit niche.
    """

    assert len(nob_limits) == len(multiplier_values), \
        "length of input lists are different"
    assert min(multiplier_values) > 0, \
        "multiplier value less than zero"
    assert min(nob_limits) == 0, \
        "nob_limit of less than zero given"
    assert nob_limits[0] == 0, \
        "lowest nob_limit not equal to zero"

    if len(nob_limits) > 1:
        for i in range(1, len(nob_limits)):
            assert nob_limits[i] > nob_limits[i - 1], \
                "nob_limits not in ascending order"

    multiplier = -1
    if total_nobs == 0:
        multiplier = 4.0

    for i in range(0, len(nob_limits)):
        if total_nobs > nob_limits[i]:
            multiplier = multiplier_values[i]

    assert multiplier > 0, "output multiplier less than or equal to zero "

    return multiplier