In all contests of elections before the judge of probate or the circuit court, the judge presiding is authorized to make an examination of the ballots given or rejected in the election so far as the judge may deem it necessary to arrive at a correct judgment, and may make and enforce by attachment all necessary orders to obtain possession of the same, and must make all proper orders necessary for the return of the ballots to the proper custody after same have been examined by him or her.
Ala. Code § 17-16-58 (1975)