Every writ of habeas corpus issued under the provisions of this chapter shall be substantially in the following form:
The state of New Mexico to the sheriff of, etc., or to A.B.:
You are hereby commanded to have the body of C.D., by you imprisoned and detained, as it is said, together with the time and cause of such imprisonment and detention, by whatever name the said C.D. shall be called or charged, before E.F., judge of the district court, as etc. (or immediately after the receipt of this writ), to do, and receive what shall then and there be considered concerning the said C.D., and have you then and there this writ.
Witness, etc.
NMS § 44-1-6