As soon as possible after the completion of the count in districts in which voting machines are used, the county board shall have the voting machines properly boxed, and removed to the place of storage provided for in this act. The voting machines shall remain locked against voting for the period of twenty days next following each primary and election, and as much longer as may be necessary or advisable because of any existing or threatened contest over the result of the primary or election, with due regard for the date of the next following election or primary, except that they may be opened and all the data and figures therein examined under the provisions of this act, by order of any court of competent jurisdiction, or judge thereof, or by direction of any legislative committee to investigate and report upon contested primaries or elections affected by the use of such machines, and such data and such figures shall be examined by such committee in the presence of the officer having the custody of such machines.
25 P.S.§ 3070