(2)If any document in such custody is, in the opinion of any district magistrate, chief presidency magistrate, High Court or Court of Session, wanted for the purpose of any court-martial, such magistrate or court may require the postal or telegraph authorities, as the case may be, to deliver such document to such person as such magistrate or court may direct.