Where a document has been tendered or produced before a court, the court may, whether or not the document is admitted in evidence, direct that the document shall be impounded and kept in the custody of an officer of the court or of another person for such period and subject to such conditions as the court thinks fit.