I am reading On Fibering Certain 3-Manifolds by Stallings. It's a short paper, and I think I understand at a high level what's happening, but there are a few technical details I don't quite get. This question is about one of those details.
In the paper, $M$ is a compact 3-manifold whose fundamental group surjects onto $\mathbb{Z}$. This homomorphism can be realized by a smooth map $f:M\rightarrow S^1$. After homotopy of $f$, we can assume there's a $p\in S^1$ transverse to $f(M)$, and then $f^{-1}(p)$ is a finite disjoint union of surfaces in $M$.
Calling these surfaces $F_i$, and using $M_j$ to denote the components of $M\setminus f^{-1}(p)$, a graph $\Gamma$ is constructed with a vertex in each $F_i$ and $M_j$, and an edge connecting two such vertices if $F_i$ is on the boundary of $M_j$. The graph is chosen so that edges only intersect in the vertices, it only intersects the $F_i$ in the chosen vertex, and the edges are transverse where they meet.
Stallings then says "it's easy to find a retraction" from $M$ to $\Gamma$. This retraction should send each $F_i$ to its corresponding vertex. It's easy to see that $\Gamma\cup F_i$ retracts to $\Gamma$. But why does that extend to $M$? I'm probably missing something obvious here, but I've been stuck on this all weekend.
You can use a simple "obstruction theory" construction.
For a preliminary step, build a CW-structure on $M$ such that $\Gamma \subset M^{(1)}$ and $F_i \subset M^{(2)}$ for each $i$.
Start by retracting each $F_i$ to the unique vertex of $\Gamma \cap F_i$.
Next, retract each vertex of $\text{interior}(M_j)$ to the unique vertex of $\Gamma \cap \text{interior}(M_j)$.
The strategy now is to use the CW-structure to extend the inclusion map $\Gamma \hookrightarrow M$ up through the skeleta in order, on those cells for which the map is not yet defined, to get the desired retraction map $M \mapsto \Gamma$, which will restrict to a retraction $M_j \mapsto \Gamma \cap M_j$ for each $j$.
So, do the following for all remaining cells in each $M_j$ on which the map is not already defined, in order by dimension: first for all such 1-cells; then 2-cells; and then 3-cells. Namely, when the turn of each such cell $e$ comes up, the map is already defined on $\partial e$, with values in the subgraph $\Gamma \cap M_j$ which is contractible, and so the map can be extended over $e$.