(Note: At $z = \pi $ or $z = -\pi$, $f(z)$ has pole of order 1, since
$\lim_{z \rightarrow \pi} f(z) = (l'hopital) \lim_{z \rightarrow \pi} \frac{(4z^3-2z\pi^2) \cos^2(z) - \sin(2z)(z^4 - z^2\pi^2)}{sin(2z)} = \infty$, which must be a pole
)
Complete Solution:
Since
$$
f(z) = \frac{z^2(z+\pi)(z-\pi) \cos^2(z)}{\sin^2(z)}
$$
thus,
$f(z)$ has singularities at $z = n\pi$ where $n \in \mathbb{Z}$.
and at each $n\pi$, $\sin^2(z)$ has zero of order 2.
Consider numerator, $z \mapsto z^2(z+\pi)(z-\pi)\cos^2(z)$ has zero of order 2 at $0\pi$, zero of order 1 at $\pi$ and $-\pi$, thus $f(z)$ has a removable singularities at 0, pole of order 1 at $\pi$ and $-\pi$, and pole of order two at $n\pi$ where $|n| \ge 2$.
Consider $g(z) := f(\frac{1}{z})$, since any disc centered at 0 in $g$ will include more than 1 singularities, that means, it is no the case that there exists a small ball, 0 is the only singularity in it. We can conclude $\infty$ is non-isolated singularity for $f$.