def METHOD_NAME(kernel, n_dim):
    n_data = 100
    key = jr.PRNGKey(123)
    x = jr.uniform(key, minval=-3.0, maxval=3.0, shape=(n_data, n_dim))
    base_kernel = kernel(active_dims=list(range(n_dim)))
    exact_linop = base_kernel.gram(x).to_dense()
    crude_approximation = RFF(base_kernel=base_kernel, num_basis_fns=10)
    c_linop = crude_approximation.gram(x).to_dense()
    better_approximation = RFF(base_kernel=base_kernel, num_basis_fns=50)
    b_linop = better_approximation.gram(x).to_dense()
    c_delta = jnp.linalg.norm(exact_linop - c_linop, ord="fro")
    b_delta = jnp.linalg.norm(exact_linop - b_linop, ord="fro")
    # The frobenius norm of the difference between the exact and approximate
    # should improve as we increase the number of basis functions
    assert c_delta > b_delta