Any judicial, executive or ministerial officer of any court having criminal jurisdiction who becomes bail for any prisoner or other person under any criminal accusation or signs any bond or other obligation for the release or appearance of such person before himself or before any other officer or court shall, on conviction, be fined not less than $50.00 nor more than $500.00 and may also be imprisoned in the county jail for not more than 12 months.