(1) When the sureties desire to be discharged from the obligations of their bond, they may arrest the principal and deliver the principal to the sheriff of the county in which the action against the principal is pending.(2) The sureties shall, at the time of surrendering the principal, deliver to the sheriff a certified copy of the original warrant and of the order admitting the principal to bail and of the bond thereon; such delivery of these documents shall be sufficient authority for the sheriff to receive and retain the principal until the principal is otherwise bailed or discharged.(3) Upon the delivery of the principal as provided herein, the sureties may apply to the court for an order discharging them from liability as sureties; and upon satisfactory proof being made that this section has been complied with the court shall make an order discharging them from liability.