When any such sealed ballots have been certified to any court in judicial proceedings, the court which has custody thereof shall, on application of such board or any person interested in a pending recount, make such order as may be necessary to permit a recount of such ballots, and to preserve the rights of all persons interested with regard to all questions and to safeguard the rights of the parties in the pending proceeding.
SDCL 12-21-30