If judgment is rendered upon the right of the person alleged to be entitled to the office and the same is in favor of such person, that person shall be entitled, after taking the oath of office and executing such official bond as may be required by law, to begin the execution of the office, and it shall be that person's duty immediately thereafter to demand of the defendant in the action all the books and papers in the defendant's custody or within the defendant's power, belonging to the office from which the defendant shall have been excluded.
N.D.C.C. § 32-13-07