When the magistrate is satisfied, by proof on oath, that there is reason to believe that any such witness will not appear and testify, unless security be required, he may order the witness to enter into a written undertaking, with such sureties and in such sum as he may deem proper, for his appearance, as specified in the last section.
R.L.1910, § 5687.