If the relief is allowed by an order of a court it shall be certified by the clerk under the seal of the court; if by a judge, it shall be under the judge's signature, and shall be directed to the person in whose custody or under whose restraint the prisoner is, and may be substantially in the following form: The People of the State of Illinois, to the Sheriff of .... county (or, "to A B," as the case may be):
You are hereby commanded to have the body of C D, imprisoned and detained by you, together with the time and cause of such imprisonment and detention by whatsoever name C D is called or charged, before .... court of .... County (or before E F, judge of, etc.), at, etc., immediately after being served with a certified copy of this order, to be dealt with according to law; and you are to deliver a certified copy of this order with a return thereon of your performance in carrying out this order.
735 ILCS 5/10-107