§ 3979. Confinement for contempt-Issuance and return of writ
When a person disobeys the order, decree, judgment or process of a court or a magistrate thereof, or is guilty of a contempt of such court or magistrate, and in consequence is imprisoned or confined by the order or judgment of such court or magistrate, such person shall be entitled to his writ of habeas corpus, returnable to the supreme court.