def METHOD_NAME(
    W: float,
    default_dev: float,
    w: npt.ArrayLike,
    x: npt.ArrayLike,
    delta: npt.ArrayLike,
    qr_med=None,
):
    """
    Quadratically regularized uncertainty
    TODO : search for a better formula for QrUnc if possible
    """
    if isinstance(w, pd.Series):
        w = w.to_numpy()
    if isinstance(x, pd.Series):
        x = x.to_numpy()
    if isinstance(delta, pd.Series):
        delta = delta.to_numpy()
    if qr_med is None:
        qr_med = QrMed(W, w, x, delta)
    delta_2 = delta**2
    bound = np.inf if W <= 0 else 1 / W
    L_second_capped = W + np.sum(
        w * np.minimum(bound, delta_2 * (delta_2 + (x - qr_med) ** 2) ** (-3 / 2))
    )
    return ((default_dev**-2) + 2 * default_dev**-3 * (L_second_capped - W)) ** (-1 / 2)