def METHOD_NAME(basis, ncells, degree, periodic, num_pts=100):
    # Function to be approximated
    # TODO: write function and domain explicitly
    f = AnalyticalProfile1D_Cos()
    # Define spline space and field
    grid, dx = np.linspace(*f.domain, num=ncells+1, retstep=True)
    Vh = SplineSpace(degree=degree, grid=grid, periodic=periodic)
    fh = FemField(Vh)
    # Compute histopolant
    xg = Vh.histopolation_grid
    Ig = np.array([quad(f.eval, xl, xr)[0] for xl, xr in zip(xg[:-1], xg[1:])])
    Vh.compute_histopolant(Ig, fh)
    # Compare to exact solution
    x  = np.linspace(*f.domain, num=num_pts)
    y  = f.eval(x)
    yh = np.array([fh(xi) for xi in x])
    max_norm_err = np.max(abs(y - yh))
    err_bound    = spline_1d_error_bound(f, dx, degree)
    assert max_norm_err < err_bound