def METHOD_NAME(precision_curve, recall_curve, nSamples=11):
    if precision_curve is None:
        return None, None
    recall_range_ = np.linspace(0, 1, nSamples)
    def p_interp(r):
        precision_candidates = precision_curve[recall_curve >= r]
        if len(precision_candidates) == 0:
            return 0
        return precision_candidates.max()
    p_interp_curve = np.array([p_interp(r) for r in recall_range_])
    return recall_range_, p_interp_curve