Solution (source code)

= Solution

The <residue> is the coefficient $a_{-1}$ in the Laurent expansion. At a double pole, $h(z)=(z-z_0)^2f(z)$ is holomorphic and $h(z)=h(z_0)+h\prime(z_0)(z-z_0)+\cdots$, so $\operatorname{Res}(f,z_0)=h\prime(z_0)$.