(e) In any other action or proceeding in which a prisoner's parental or marital rights are subject to adjudication, an order for the prisoner's temporary removal from the institution and for the prisoner's production before the court may be made by the superior court of the county in which the action or proceeding is pending, or by a judge thereof. A copy of the order shall be transmitted to the warden, superintendent, or other person in charge of the institution not less than 15 days before the order is to be executed. The order shall be executed by the sheriff of the county in which it shall be made, whose duty it shall be to bring the prisoner before the proper court, to keep the prisoner safely, and when the prisoner's presence is no longer required, to return the prisoner to the institution from which the prisoner was taken. The expense of executing the order shall be a proper charge against, and shall be paid by, the county in which the order shall be made. The order shall be to the following effect:
County of ____ (as the case may be).
The people of the State of California to the warden of ____:
An order having been made this day by me, that (name of prisoner) be produced in this court as a party in the case of ____, you are commanded to deliver (name of prisoner) into the custody of ____ for the purpose of (recite purposes).
Dated this ____ day of ____, 20__.