Example 3 Given that the graph of the function $y=f(x)$ is symmetric about points $A\left(a, y_{0}\right)$ and $B\left(b, y_{0}\right)$ on $\mathbf{R}$, and there are no other points of symmetry within the interval $(a, b)$, find the smallest positive period of the function $y=f(x)$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
Recall the function with the smallest positive period and whose graph is symmetric about a point, such as the sine function $y=\sin x$ whose graph is symmetric about two adjacent points $A(0,0), B(\pi, 0)$. The difference in the x-coordinates of these two points is $\pi-0=\pi$, and twice this difference, i.e., $2 \pi$, is the smallest positive period of $\sin x$. By analogy, we conjecture that $2(b-a)$ is the smallest positive period of the function $y=f(x)$.
Below is the proof that $2(b-a)$ is the smallest positive period of the function $y=f(x)$.
Since the graph of $y=f(x)$ is symmetric about the point $A\left(a, y_{0}\right)$, for any point $P_{1}((a-x), f(a-x))$ on the graph of $y=f(x)$, its symmetric point $P_{2}$ about $A\left(a, y_{0}\right)$ must also be on the graph of $y=f(x)$. Therefore, the coordinates of $P_{2}$ are: $P_{2}((a+x), f(a+x))$, so $f(a-x)+f(a+x)=2 y_{0}$, which means
$$
f(a-x)=2 y_{0}-f(a+x) .
$$

Similarly, we can prove: $f(b-x)=2 y_{0}-f(b+x)$.
Thus, $f[2(b-a)+x]=f[b+(b-2 a+x)]=2 y_{0}-f(2 a-x)$
$$
=2 y_{0}-f[a+(a-x)]=f(x) \text {. }
$$

Therefore, $T=2(b-a)$ is a positive period of $y=f(x)$.
If the function $y=f(x)$ has a positive period $T^{*}\left(0<T^{*}<2(b-a)\right)$, let $a^{\prime}=\frac{2 b-T^{*}}{2}$, clearly $a<a^{\prime}<b$.
At this time, we have: $f\left(a^{\prime}+x\right)=f\left(b-\frac{T^{*}}{2}+x\right)$
$$
\begin{array}{l}
=2 y_{0}-f\left[b-\left(x-\frac{T^{*}}{2}\right)\right] \\
=2 y_{0}-f\left(b-x+\frac{T^{*}}{2}\right) \\
=2 y_{0}-f\left[(b-x)+\frac{T^{*}}{2}\right] \\
=2 y_{0}-f\left[\left(b-\frac{T^{*}}{2}\right)-x\right] \\
=2 y_{0}-f\left(a^{\prime}-x\right) .
\end{array}
$$

So $f\left(a^{\prime}+x\right)=2 y_{0}-f\left(a^{\prime}-x\right)$, which means the graph of $y=f(x)$ is symmetric about the point $\left(a^{\prime}, y_{0}\right)$. This contradicts the given condition. Therefore, $T=2(b-a)$ is the smallest positive period of the function $y=f(x)$.