Any court or officer whose duty it is to pass upon the account of any person or corporation required by law to give a bond may, whenever such person or corporation has given any such surety company as surety upon such bond, allow in the settlement of such account a reasonable sum for the expense of procuring such surety.
§ 33-26-106, MCA