Example 4: Party A has $m$ beans, and Party B has $m+2n$ beans $(m, n \geqslant 1)$. A and B play a game by tossing a coin. If it lands heads, B gives A one bean; if it lands tails, A gives B one bean. If someone runs out of beans, the game ends. Let $A$ denote the set of all sequences of coin tosses that result in A losing all $m$ beans exactly on the $(m+2n)$-th coin toss. Try to find the number of sequences in $A$.

---

The translation maintains the original text's formatting and structure, including the use of mathematical notation and the example number.
Let when the $k$-th coin toss occurs, if it lands heads, then let $a_{k}=-1$, if it lands tails, then let $a_{k}=1$, and let $b_{k}=a_{1}+a_{2}+\cdots+a_{k}(k=1,2, \cdots, m+2 n)$. Thus, if $b_{k} \geqslant 0$, then $b_{k}$ represents the total number of beans that A has given to B after the $k$-th coin toss; if $b_{k}<0$, then $\left|b_{k}\right|$ represents the total number of beans that B has given to A. According to the problem, $b_{m+2 n}=m$. Draw a broken line from $O(0,0)$ to $M(m+2 n, m)$, and sequentially pass through $\left(1, b_{1}\right),\left(2, b_{2}\right), \cdots,\left(m+2 n-1, b_{m+2 n-1}\right)$. Thus, each sequence $a$ in $A$ corresponds to a broken line $l$ from $O(0,0)$, and reaches the line $y=m$ for the first time at $x=m+2 n$. At this point, we let $a$ correspond to $l$, so the correspondence between $A$ and $B$ is one-to-one, hence $|A|=|B|$.

Let $E$ be the set of all broken lines that leave $O(0,0)$ and do not touch the $x$-axis again, and ultimately reach the point $M(m+2 n, m)$. We will prove that $|B|=|E|$. In fact, as shown in Figure $1-9$, take any broken line $l$ in $B$. Take the midpoint $P$ of the line segment $OM$, and rotate $l$ by $180^{\circ}$ around $P$ to get the broken line $l^{\prime}$, then $l^{\prime} \in E$. Let $l$ correspond to $l^{\prime}$, thus we obtain a one-to-one correspondence between $B$ and $E$, so $|B|=|E|$. Since the broken lines in $E$ must pass through the point $(1,1)$, ultimately reach the point $M(m+2 n, m)$, and have no common points with the $x$-axis, by the corollary of the reflection principle, we get
$$
\begin{aligned}
|A| & =|B|=|E|=C_{m+2 n-1}^{\frac{1}{2}(m+2 n-1+m-1)}-C_{m+2 n-1}^{\frac{1}{2}(m+2 n-1+m+1)} \\
& =C_{m+2 n-1}^{m+n-1}-C_{m+2 n-1}^{m+n} \\
& =\frac{m}{m+n} C_{m+2 n-1}^{n} .
\end{aligned}
$$