The city or village attorney shall be the legal advisor of the council or board of trustees. He shall commence, prosecute, and defend all suits and actions necessary to be commenced, prosecuted or defended on behalf of the corporations, or that may be ordered by the council or board of trustees. When requested, he shall attend meetings of the council or board and give them his opinion upon any matters submitted to him, either orally or in writing, as may be required. He shall draft or review for legal correctness ordinances, contracts, franchises and other instruments as may be required, and he shall perform such other duties as may be imposed upon him by general law or ordinance. The governing body of the city or village shall have the right to pay the city or village attorney compensation for legal services performed by him for it on such terms as the governing body and attorney may agree, and to employ additional legal assistance and to pay for such legal assistance out of the funds of the city or village.