A witness against a person accused of a felony shall be ordered released from custody unless the court determines in the exercise of discretion that such release will not reasonably assure that the witness will appear and testify at the trial as required. When a determination to release the witness from custody is made, the court may impose any of the following conditions of release which will reasonably assure the appearance of the witness for trial or, if no single condition gives that assurance, any combination of the following conditions:
(1) Place the witness in the custody of a designated person or organization agreeing to supervise him or her;
(2) Place restrictions on the travel, association, or place of abode of the witness during the period of such release;
(3) Require, at the option of any witness, either of the following:
(a) The execution of an appearance bond in a specified amount and the deposit with the clerk of the court in cash of a sum not to exceed ten percent of the amount of the bond, one hundred percent of such deposit to be returned to the witness upon the performance of the appearance or appearances; or
(b) The execution of a bail bond with such surety or sureties as the court shall deem proper or, in lieu of such surety or sureties, at the option of such witness, a cash deposit of the sum so fixed, conditioned upon his or her appearance before the proper court as a witness, and to appear at such times thereafter as may be ordered by the proper court. If the amount of bail is deemed insufficient by the court before whom the offense is pending, such court may order an increase of such bail and the witness must provide the additional undertaking, written or cash, to secure his or her release. All recognizances shall be in writing and be continuous from term to term until final judgment of the court in the case. Each surety on such recognizance shall be required to justify under oath in a sum twice the amount of such recognizance and give the description of real estate owned by him or her of a value, above encumbrance, equal to the amount of such justification, and shall name all other cases pending in which he or she is a surety. No one shall be accepted as surety on recognizance aggregating a sum in excess of his or her equity in his or her real estate, but such recognizance shall not constitute a lien on such real estate until judgment is entered thereon against such surety; or
(4) Impose any other condition deemed reasonably necessary to assure appearances as required, including a condition requiring that the witness return to custody after specified hours.