2. To make the function $f(x)=\frac{1}{(x-2)^{2}}-2 x+\cos 2 \theta-3 \sin \theta+2$ always positive for $x \in(-\infty, 2)$, the range of the parameter $\theta$ in the interval $(0, \pi)$ is $\qquad$ .
2. $00$ always holds, i.e., $\cos 2 \theta-3 \sin \theta+2>2 x-\frac{1}{(x-2)^{2}}$ always holds. Let $g(x)=2 x-\frac{1}{(x-2)^{2}}$, then we have $\cos 2 \theta-3 \sin \theta+2>g(x)_{\max }$. Since $g(x)=2 x-\frac{1}{(x-2)^{2}}=4-\left[(2-x)+(2-x)+\frac{1}{(2-x)^{2}}\right] \leqslant 1$ (when $x=1$), thus $\cos 2 \theta-3 \sin \theta+2>g(x)_{\max }=1, \therefore 2 \sin ^{2} \theta+3 \sin \theta-2<0$, solving it yields $-2<\sin \theta<\frac{1}{2}$. Also, $\sin \theta \geqslant-1$, so $-1 \leqslant \sin \theta<\frac{1}{2}$, and $\theta \in(0, \pi)$. In summary, we get $0<\theta<\frac{\pi}{6}$ or $\frac{5 \pi}{6}<\theta<\pi$.