Example 12 Let $f(x, y)$ be a binary polynomial, and satisfy the conditions:
(1) $f(1,2)=2$;
(2) $y f(x, f(x, y)) \equiv x f(f(x, y), y) \equiv (f(x, y))^{2}$.
Determine all such $f(x, y)$.
(31st IMO National Training Team Test Question (iv))
Analysis: We can set up a system of equations for the exponents of $x$ and $y$ based on the conditions.

Solution: From condition (2), we know that $x$ and $y$ are factors of $f(x, y)$, i.e., $\square$
$$
f(x, y) = x y g(x, y),
$$

where $g(x, y)$ is also a bivariate polynomial.
According to (1), let the highest degree of $x$ in $f(x, y)$ be $m$, and the highest degree of $y$ be $n$. From condition (2), we get
$$
\begin{array}{l}
\left\{\begin{array}{l}
1 + n^2 = 2n, \\
1 + m^2 = 2m
\end{array}\right. \\
\Rightarrow\left\{\begin{array}{l}
m = 1, \\
n = 1.
\end{array}\right.
\end{array}
$$

From $f(x, y) = x y g(x, y)$, then $g(x, y) = c$ (a constant).
By comparing with (1) and condition (1), we get $c = 1$. Therefore, $f(x, y) = x y$.