Any such district shall be required at all times to have a valid and subsisting franchise, either running to it as original grantee from such city or village, or assigned to it by or through a grantee of the city or village, if such district proposes to generate, distribute and sell, or to distribute and sell, electrical energy to such city or village or to its inhabitants, as a condition precedent to the operation of such district's electric utility or utilities within such city or village, in every case and to the same extent as where a private corporation is required to have such valid and subsisting franchise to operate its electric utility or utilities within such city or village.