At any time after the service of the notice of such contest, the person serving the same may proceed to take depositions as hereinafter provided, and the person to whom a notice is given may proceed to take such depositions as soon as he serves his answer. Such depositions shall be taken with the same notice and under the same procedure and subject to the same conditions, so far as applicable, as depositions in a civil action, and shall be returned by the officer taking the same to the secretary of state, and filed in the Office of the Secretary of State, who shall be authorized to open the same at the instance of either party, his attorney, or agent.
SDCL 12-22-27