If the court concludes that the facts set forth in the petition, if true, are sufficient to justify the issuance of the writ, the same shall be issued. It shall be addressed to each county recount board, and to each other authority which the plaintiff claims to have exceeded its jurisdiction, including misapplication of the law in determination of questions concerning disputed ballots, and shall command each such board or authority at or before a time specified to certify to the court all its records and proceedings with reference to such matter. If questions as to validity of any disputed ballots are involved, the writ shall command the county auditor having custody thereof to return at the time designated the sealed envelopes containing the disputed ballots in question.
SDCL 12-21-50