Let $\gamma$ be a closed path in a domain $D$ such that $W(\gamma,\zeta)=0$ (winding number) for all $\zeta\notin D$. Suppose that $f$ is analytic on $D$ except at isolated singularities $z_1,...z_m\in D\backslash \text{Im}(\gamma)$. Then, $\displaystyle \int_\gamma f(z) dz=2\pi i\sum W(\gamma,z_k)\text{Res}[f,z_k]$.
I am supposed to use the Laurent decomposition, at each $z_k$. I know I want to do something similar to the classic proof for the residue theorem for $\int_{\partial D} f$ and find a sufficiently small circle $\gamma_k$ around each singularity and then use the Laurent decomposition to end up with something like
$\displaystyle\int_\gamma f \ dz=\sum_{k=1}^m \left(\int_\gamma\sum_{-\infty}^{-1} a_{k_n}(z-z_k)^n\right)\int_{\gamma_k} f\ dz$
where $\sum_{-\infty}^\infty a_{k_n}(z-z_k)^n$ is the Laurent series of $f$ at $z_k$. I can see what to do given this equality; however, I can't see how to get to this equality. Any guidance would be greatly appreciated.