How would one assemble a form so that the result is a matrix
$$K_{ij}=\int_D \int_D C(\boldsymbol{x},\boldsymbol{y}) \phi_i(\boldsymbol{y}) \phi_j(\boldsymbol{x})\, d\boldsymbol{y} d\boldsymbol{x}$$
where $C(x,y)$ is a function and $\phi_i(x)$ are basis for the finite element space.
This is basically related to the solution of the Fredholm integral eigenvalue problem.