If an inspection of the ballots or poll books of any election district in this state shall become necessary for the determination of any election contest before any court, the presiding judge thereof may, by order naming the district or districts, require the proper officer to procure the same from the county auditor, or other person in whose possession or custody the same may be, and such clerk or person shall deliver the same to said officer, who shall deliver them unopened to such presiding judge.
Idaho Code § 34-2018