Example 3 Find the minimum value of the function $y=\sin x+\frac{2}{\sin x}(0<x<\pi)$.

 untranslated part:
```
(0<x<\pi)
``` 

The untranslated part is kept as it is commonly acceptable to leave mathematical expressions and conditions in their original form. However, if you prefer the entire text to be translated, it would be:

Example 3 Find the minimum value of the function $y=\sin x+\frac{2}{\sin x}(0 < x < \pi)$.
Analyzing the conjecture that when: $\sin x=1$, the function reaches its minimum value $y=3$, thus the problem is transformed into proving that the inequality $\sin x+\frac{2}{\sin x} \geqslant 3$ always holds and the equality can be achieved when $0<x<\pi$.

Solution Since $0<\sin x \leqslant 1, \sin x+\frac{2}{\sin x} \geqslant 3 \Leftrightarrow \sin ^{2} x-3 \sin x+2 \geqslant 0 \Leftrightarrow(\sin x-1)(\sin x-2)$ $\geqslant 0$, the latter inequality is obviously true, and the equality is achieved when $\sin x=1$. Therefore, $y_{\text {min }}=3$.