The magistrate holding a preliminary hearing, upon the request of the defendant, may exclude from the examination every person except the magistrate's clerk, the prosecutor and the prosecutor's counsel, the attorney general of the state, the state's attorney of the county, the defendant and the defendant's counsel, and such other person as the defendant may designate, and the officer having the defendant in custody, but such exclusion, and the extent thereof, is within the discretion of the court.
N.D.C.C. § 29-07-14