If any person, party, or witness disobeys an order of the judge or referee duly served, such person may be punished by the judge as for a contempt. In all cases of commitment under this chapter, the person committed, in case of inability to perform the act required, or to endure the imprisonment, may be discharged from imprisonment by the judge committing the person.
N.D.C.C. § 28-25-16