Example 2 For the quadratic equation in $x$
$$
x^{2}-(\tan \theta+\mathrm{i}) x+\mathrm{i}(2 \mathrm{i}-1)=0(\theta \in \mathbf{R}) \text {. }
$$
(1) If this equation has 1 real root, find the value of the acute angle $\theta$;
(2) For any real number $\theta$, prove: this equation cannot have a purely imaginary root.
(1) If this equation has 1 real root $a$, then by the condition of equality of complex numbers, we get
$$
\left\{\begin{array}{l}
a^{2}-a \tan \theta-2=0, \\
a+1=0 .
\end{array}\right.
$$

Solving this, we get $a=-1, \tan \theta=1$.
Since $0<\theta<\frac{\pi}{2}$, hence $\theta=\frac{\pi}{4}$.
(2) Proof by contradiction.

Assume there exists a real number $\theta$ such that the original equation has a pure imaginary root $b \mathrm{i} (b \in \mathbf{R}, b \neq 0)$, then
$$
-b^{2}+b-2-(b \tan \theta+1) \mathrm{i}=0,
$$

which gives $\left\{\begin{array}{l}b^{2}-b+2=0, \\ b \tan \theta+1=0 .\end{array}\right.$
Clearly, the equation $b^{2}-b+2=0$ has no real roots, so the system of equations has no real solutions, leading to a contradiction. Therefore, for any real number $\theta$, the original equation cannot have a pure imaginary root.