Section 5. If perjury is reasonably presumed, as aforesaid, papers, books or documents which have been produced and are considered necessary to be used on a prosecution for such perjury may by order of the court be detained from the person who produces them so long as may be necessary for their use in such prosecution.