The judge of the circuit court may visit, inspect, and supervise all the jails in his circuit and all county and municipal officers shall comply with the orders of such court relating to jails or inmates therein, in accordance with law and the policies and procedures provided for in § 24-11-23, and the violation of any such order may be punished as a contempt of court.
SDCL 24-11-27