Studying integration over unitary group I came across this function, the Weingarten function Wg, such that $$ \int_{\mathcal{U}(N)} \prod_{k=1}^{n} U_{i_kj_k} U^*_{m_k r_k} dU=\sum_{\tau,\sigma\in S_n} {\rm Wg}^U(\tau^{-1}\sigma)\prod_{k=1}^n \delta_{i_k,\tau(m_k)}\delta_{j_k,\sigma(r_k)}.$$ I understand the structure of this equation, the $m$'s must be a permutation of the $i$'s, and likewise the $r$'s with the $j$'s. However, the function itself is complicated, $$ {\rm Wg}(\tau^{-1}\sigma)=\frac{1}{n!^2}\sum_{\substack{\lambda\vdash n\\\ell(\lambda)\leq N}} \frac{d_\lambda^2}{s_\lambda(1^N)}\chi_\lambda(\tau^{-1}\sigma),$$ where $s_\lambda$ are Schur functions, $d_\lambda$ is the dimension of a irreducible representation of the permutation group labelled by $\lambda$ and $\chi$ are the characters of the irreps of this group. The derivations I have seen of this result are also complicated.

Can anyone offer some insight into this function and how it is derived?