A city of the second class or village is hereby given, for the purpose of erecting and operating a power plant, electric or other light works as provided in section , a right-of-way over and the right to erect and maintain transmission lines upon, within, and across any of the public highways of the state, subject to sections to .