(a) If it is a city court, pay the forfeited bail to the treasurer or other financial officer of the city. Such forfeited bail, unless otherwise provided by law, is the property of such city.
(b) If it is a town court or a village court, pay the forfeited bail to the state comptroller on or before the tenth day of the month next succeeding such forfeiture. Such forfeited bail, unless otherwise provided by law, is the property of the town or village in which the offense charged is alleged to have been committed; provided, however, that when (i) a single amount of bail is posted for more than a single offense charged, and (ii) the town or village justice court does not attribute a specific amount of bail to each offense, and (iii) forfeited bail for at least two of the offenses would be the property of different governmental entities, the entire amount of forfeited bail shall be the property of the town or village in which the offenses charged are alleged to have been committed, except that, when forfeited bail for at least one of the offenses would be the property of the state, the entire amount of forfeited bail shall be the property of the state.