All fines, penalties, and forfeitures resulting from violations of ordinances of political subdivisions shall be returned to the political subdivision whose ordinance is involved in the manner provided by rule of the supreme court. Fines, penalties, and forfeitures imposed after appeals accrue to the state, unless the appeal is prosecuted by the political subdivision.