Probing nuclear bubble configuration by the $\pi^{-} / \pi^{+}$ ratio in heavy-ion collisions