def METHOD_NAME(self, dim, degree):
    """
    Check that the interpolant converges at the correct order
    """
    np.random.seed(0)
    fun = get_random_polynomial(dim, degree+1)
    rule = sopp.UniformInterpolationRule(degree)
    nsamples = 1000
    xran = [1.0, 4.0, 10]
    yran = [1.1, 3.9, 10]
    zran = [1.2, 3.8, 10]
    xpoints = np.random.uniform(low=xran[0], high=xran[1], size=(nsamples, ))
    ypoints = np.random.uniform(low=yran[0], high=yran[1], size=(nsamples, ))
    zpoints = np.random.uniform(low=zran[0], high=zran[1], size=(nsamples, ))
    xyz = np.asarray([xpoints, ypoints, zpoints]).T.copy()
    fhxyz = np.zeros((nsamples, dim))
    fxyz = fun(xyz[:, 0], xyz[:, 1], xyz[:, 2], flatten=False)
    err = 1e6
    for n in [5, 10, 20, 40]:
        xran[2] = n
        yran[2] = n
        zran[2] = n
        interpolant = sopp.RegularGridInterpolant3D(rule, xran, yran, zran, dim, True)
        interpolant.interpolate_batch(fun)
        interpolant.evaluate_batch(xyz, fhxyz)
        err_new = np.mean(np.linalg.norm(fxyz-fhxyz, axis=1))
        print(err_new/err)
        assert err_new/err < 0.6**(degree+1)
        err = err_new