An officer required by any person to attend at any place out of the city or town in which the officer normally discharges his or her duties of office, may require that person to (a) deposit a sum of money sufficient to cover the expected charges and expenses associated with the attendance; and(b) undertake to pay any charges and expenses in excess of the deposit.