Whenever any system of improvement constructed under the provisions of this chapter will drain, protect or otherwise improve the whole or any part of any public road, roadbed or track thereof, or where any such system of improvement will furnish an outlet for or facilitate the construction or maintenance of any sewer system in any city or town, there shall be apportioned against the state, in the case of state primary and secondary highways, and against the county in which any other such state or county road outside of any incorporated city or town is located, or against the city or town in which any such public road is located, or against any such other road or part thereof so drained, protected or otherwise improved, or against the city or town for which an outlet for sewage will be furnished or wherein the construction or maintenance of a sewer system will be facilitated, the proper amount of the total sum to be apportioned. The board of county commissioners may pay such portion as they deem proper of the amount assessed against the county on account of the drainage, protection or improvement of the roads, out of the funds of the road district in which such drainage, protection or improvement is made. The amount assessed against the state shall be paid out of the appropriate fund of the state.