Any party to any action brought under this chapter may, upon notice, apply to the court in which the action is pending, or to any judge thereof, for an order requiring any other party to give to the applicant, within a specified time, an inspection and copy, or permission to take a copy, of entries of accounts in any book, or of any documents, papers, or memoranda in such party’s possession or under his control containing evidence relating to the merits of any such action or any defense therein.
If a compliance with the order is refused, the court shall exclude the entries of accounts in any such book, or any such document, paper, or memorandum from being given in evidence by the other party, or if wanted as evidence by the applicant the court shall presume them to be as the applicant alleges.