已知 $\omega>0$, 函数 $f(x)=\sin \omega x$ 与 $g(x)=\cos \omega x$ 的图像在 $[\pi, 2 \pi]$ 上最多有两个公共点, 则 $\omega$的取值范围为
$\text{A.}$ $\left(0, \frac{17}{8}\right) \cup\left(\frac{9}{4}, \frac{21}{8}\right)$
$\text{B.}$ $\left(0, \frac{5}{4}\right] \cup\left(\frac{9}{4}, \frac{17}{8}\right]$
$\text{C.}$ $\left(0, \frac{1}{4}\right] \cup\left(\frac{5}{4}, \frac{17}{8}\right)$
$\text{D.}$ $\left(0, \frac{17}{8}\right] \cup\left(\frac{9}{4}, \frac{5}{2}\right)$