If a witness fails to attend for examination when duly required to do so, or refuses to be sworn, or to answer as a witness, before a notary public or any other officer, board, or tribunal authorized by law to require the witness's attendance for examination and to take testimony, the notary public, officer, board, or tribunal shall certify that fact to the judge of the district court of the county in which the witness resides or in which the witness may be present. The judge, by order, then shall require the witness to attend an examination before the judge at a specified time and place. Upon the return day of the order, the examination of the witness must be conducted before the judge, and for the failure of the witness to attend, or to be sworn, or to answer as a witness, or for a refusal of the witness to do any act required of the witness by law, the witness may be punished as for a contempt in the manner provided in this chapter.
N.D.C.C. § 27-10-23