"The operators with nontrivial vacuum expectation values have to soak up the zero modes associated to the anomaly." I was reading ref.1, where one can read (emphasis mine)

... the vacuum expectation value $\langle \mathcal O_{\phi_1}\cdots \mathcal O_{\phi_\ell}\rangle$ vanishes unless
  $$
\sum_{k=1}^\ell\mathrm{deg}(\mathcal O_{\phi_k})=2d(1-g)+c_1\tag{4.13}
$$
  [...] This selection rule corresponds to the fact that the $U(1)$ current is anomalous, and the anomaly is given by the r.h.s. of (4.13), which calculates the number of zero modes of the Dirac operator (in other words, the r.h.s. is minus the ghost number of the vacuum). As usual in quantum field theory, the operators with nontrivial vacuum expectation values have to soak up the zero modes associated to the anomaly.

I am completely mystified by this last sentence. What does it mean, and why is it true? Are there well-known/simple examples of anomalies that can illustrate this phenomenon?
References.


*

*Chern-Simons Theory and Topological Strings, M. Mariño, arXiv:hep-th/0406005.

 A: A theory with a (generalized) Dirac operator may happen to be anomalous. For example, the ghost sector of the bosonic string:
$$ S = \int d^2z [ b \partial c  + c.c.]$$
has a gravitational anomaly giving rise to an index of 3, i.e., number of $c$ zero-modes exceeds the  number of $b$ zero modes by 3. Please see Friedan, Martinec and Schenker.
Since we can think of the fermion path integral measure $\mathcal{D} \psi$ as a product of the Grassmann measures of its individual modes, then in the case of a zero mode, we end up with a contribution of $d\psi_0$ in the path integral where $\psi_0$ is the zero mode. This is because the zero mode does not appear in the Berezin determinant Grasmann component. 
Since the Grassmann integral of the zero mode is 
$$\int d\psi_0 = 0$$
While, for the non-zero modes 
$$\int \psi_i d\psi_i = 1, $$
the partition function vanishes unless we insert operators that have enough zero mode components to get contributions of the form:
$$\int \psi_0 d\psi_0 = 1,$$
for all the zero modes. There are constraints on the selection of the inserted operators, such as BRST invariance, but once these operators are chosen, they "soak up" the zero modes and allow a nonvanishing partition function. 
This is not just a mathematical trick to obtain a nonvanishing partition function of some abstract model. The partition functions with the inserted operators should really correspond to physical systems. 
Witten(page 39) uses insertions in a Majorana fermion topological superconductor model to evaluate its partition function which can be understood as to be a consequence of gravitational anomalies.
There are many explanations of the physical interpretation of the operator insertions: 
The asymptotic "out" vacuum state of an anomalous theory has a zero-mode ghost number charge due to the spectral flow. Please see Friedan, Martinec and Shenker page 111. The insertions just express this fact.
May be the deepest and the clearest explanation of the operator insertion is given by Sonneschein:
The vector space of the zero modes can be thought of as a (geometric) quantization of a moduli space $\mathcal{M}$. In the case of a topological field theory, this moduli space is the whole phase space of the system, but even if the theory is not topological, the zero modes constitute of a topological sector. The fermion zero modes can the interpreted as the cotangent vectors in this moduli space. Since only $dim(\mathcal{M})$ rank forms have a nonvanishing integral  over $\mathcal{M}$, thus the index dictates the dimension of this moduli space: 
$$Index(D) = dim(\mathcal{M})$$
Since, in the path integral, we need to integrate over all possible configurations, thus we need to integrate on the moduli space, thus we need to insert a $dim(\mathcal{M})$ rank form.
