def getBounds(lvls_arr: list, n_lvl: float):
    """
    A helper function to calculate the BN interpolation
    @param lvls_arr: The corruption levels list
    @param n_lvl: The current level to interpolate
    @return: Returns the post and previous corruption levels
    """
    lower = lvls_arr[0]
    upper = lvls_arr[1]
    for i, v in enumerate(lvls_arr[:-1]):
        if n_lvl <= v:
            break
        lower = v
        upper = lvls_arr[i + 1]

    return lower, upper