(Example 3 Given that the function $y=f(x)$ has an inverse function within its domain $(-\infty, 0]$, and $f(x-1)=x^{2}-2 x$, find the value of $f^{-1}\left(-\frac{1}{2}\right)$.
Solve: Since $f(x-1)=x^{2}-2 x=(x-1)^{2}-1$, then $f(x)=x^{2}-1$. Let $f^{-1}\left(-\frac{1}{2}\right)=t \in(-\infty, 0]$, then $f(t)=-\frac{1}{2}$, so $t^{2}-1=-\frac{1}{2}$, solving this gives $t= \pm$ $\frac{\sqrt{2}}{2}$. Since $t \in(-\infty, 0)$, then $t=-\frac{\sqrt{2}}{2}$, so $f^{-1}\left(-\frac{1}{2}\right)=-\frac{\sqrt{2}}{2}$.