The court or officer to whom any affidavit is presented as a basis for some action, in relation to which any discretion is lodged with such court or officer, may require the witness to be brought before it or the officer and submit to a cross-examination by the opposite party.
Iowa Code § 622.90