def METHOD_NAME(interp, expi, extrap, expe):
    quantiles = np.linspace(0, 1, num=25)
    xq = xr.DataArray(
        np.linspace(205, 229, num=25),
        dims=("quantiles",),
        coords={"quantiles": quantiles},
    )
    yq = xr.DataArray(
        np.linspace(2, 4.4, num=25),
        dims=("quantiles",),
        coords={"quantiles": quantiles},
    )
    newx = xr.DataArray(
        np.linspace(240, 200, num=41) - 0.5,
        dims=("time",),
        coords={"time": xr.cftime_range("1900-03-01", freq="D", periods=41)},
    )
    newx = newx.where(newx > 201)  # Put some NaNs in newx
    xq = xq.expand_dims(lat=[1, 2, 3])
    yq = yq.expand_dims(lat=[1, 2, 3])
    newx = newx.expand_dims(lat=[1, 2, 3])
    out = u.interp_on_quantiles(
        newx, xq, yq, group="time", method=interp, extrapolation=extrap
    )
    if np.isnan(expe):
        assert out.isel(time=0).isnull().all()
    else:
        assert out.isel(lat=1, time=0) == expe
    np.testing.assert_allclose(out.isel(time=25), expi)
    assert out.isel(time=-1).isnull().all()
    xq = xq.where(xq != 220)
    yq = yq.where(yq != 3)
    out = u.interp_on_quantiles(
        newx, xq, yq, group="time", method=interp, extrapolation=extrap
    )
    if np.isnan(expe):
        assert out.isel(time=0).isnull().all()
    else:
        assert out.isel(lat=1, time=0) == expe
    np.testing.assert_allclose(out.isel(time=25), expi)
    assert out.isel(time=-1).isnull().all()