Solution (source code)

= Solution

Put $w=z-\pi$. The identity $\cosh^2(1/w)=[1+\cosh(2/w)]/2$ gives a <Laurent series> containing a constant and only even negative powers $w^{-2},w^{-4},\ldots$. There is no $w^{-1}$ coefficient, so
$$
\boxed{\operatorname{Res}_{z=\pi}\cosh^2\!\left(\frac1{z-\pi}\right)=0.}
$$
The singularity is an <essential singularity>, not a pole: infinitely many negative Laurent coefficients are nonzero. The residue is still defined as the coefficient of $w^{-1}$.