The obligations of cities and towns with municipal electric departments established under chapter 164 of the General Laws or by a special act shall be treated as expenses of operating their electric plants and shall constitute special obligations of the cities and towns, payable solely from the revenues and other moneys derived by the cities and towns from their electric departments or systems.