One way to compute the fundamental group of a graph $G$ is by finding a maximal subtree $T \subseteq G$, and using the fact that the quotient map $G \to G / T$ is a homotopy equivalence. The quotient $G / T$ is just a wedge of circles, with one circle for each edge of $G$ not contained in $T$. Therefore, $\pi_1(G)$ is a free group with one generator for each edge of $G$ not contained in $T$.
The problem is that this is a relatively nonconstructive way of computing $\pi_1(G)$. In particular, it is not always clear what the generators of $\pi_1(G)$ are. Although we know exactly what the generators of $\pi_1(G / T)$ are, there usually is not an obvious homotopy inverse $G / T \to G$ (otherwise, composing the generators of $\pi_1(G / T)$ with this map would give the generators of $\pi_1(G)$).
For example, consider the following graph $G$, with the subtree $T$ highlighted in blue:
One can try to imagine what the homotopy inverse $G / T \to G$ should be, for instance by extending the contraction of $T$ to a homotopy on all of $G$. But this seems like more work than should be necessary; it seems intuitive that the fundamental group of $G$ is generated by the five empty regions in the graph.
So my question is, is there an easy way to read off what $\pi_1(G)$ should be generated by, using this "maximal subtree" method?
