I'm looking at the following lecture notes where we start with the circuit below for some state $\vert\psi\rangle_L$ that picks up an error to become $E\vert\psi\rangle_L$
It is later claimed in the notes that the syndrome extraction part of the circuit can be represented by the following operation on $E\vert\psi\rangle_L$.
$$E|\psi\rangle_{L}|0\rangle_{A} \rightarrow \frac{1}{2}\left(I_{1} I_{2}+Z_{1} Z_{2}\right) E|\psi\rangle_{L}|0\rangle_{A}+\frac{1}{2}\left(I_{1}I_{2}-Z_{1} Z_{2}\right) E|\psi\rangle_{L}|1\rangle_{A}$$
How does one see this? I can write the Hadamard and the control $Z_1Z_2$ gates as 8x8 matrices but this seems like a tedious way to do it. The alternative is to express the control $Z_1Z_2$ gates using something like this answer. However, I was unable to do it this way either.
So the question is - how do I see that the following line is true just by looking at the circuit?
$$E|\psi\rangle_{L}|0\rangle_{A} \rightarrow \frac{1}{2}\left(I_{1} I_{2}+Z_{1} Z_{2}\right) E|\psi\rangle_{L}|0\rangle_{A}+\frac{1}{2}\left(I_{1}I_{2}-Z_{1} Z_{2}\right) E|\psi\rangle_{L}|1\rangle_{A}$$