def METHOD_NAME(random):
    t = xr.cftime_range("2000-01-01", "2030-12-31", freq="D", calendar="noleap")
    ref = xr.DataArray(
        (
            -20 * np.cos(2 * np.pi * t.dayofyear / 365)
            + 2 * random.random(t.size)
            + 273.15
            + 0.1 * (t - t[0]).days / 365
        ),  # "warming" of 1K per decade,
        dims=("time",),
        coords={"time": t},
        attrs={"units": "K"},
    )
    sim = xr.DataArray(
        (
            -18 * np.cos(2 * np.pi * t.dayofyear / 365)
            + 2 * random.random(t.size)
            + 273.15
            + 0.11 * (t - t[0]).days / 365
        ),  # "warming" of 1.1K per decade
        dims=("time",),
        coords={"time": t},
        attrs={"units": "K"},
    )
    ref = ref.sel(time=slice(None, "2015-01-01"))
    hist = sim.sel(time=slice(None, "2015-01-01"))
    group = Grouper("time.month")
    quantiles = u.equally_spaced_nodes(15, eps=1e-6)
    ref_q = group.apply(nbu.quantile, ref, main_only=True, q=quantiles)
    hist_q = group.apply(nbu.quantile, hist, main_only=True, q=quantiles)
    af = u.get_correction(hist_q, ref_q, "+")
    for interp in ["nearest", "linear", "cubic"]:
        afi = u.interp_on_quantiles(
            sim, hist_q, af, group="time.month", method=interp, extrapolation="constant"
        )
        assert afi.isnull().sum("time") == 0, interp