The city council shall appoint a city attorney, which may be a law firm, and shall provide for payment of such attorney for the services rendered to the city. The city attorney shall be responsible for the representation and defense of the city in all litigation in which the city is a party and will coordinate such representation with all attorneys provided to the city through applicable insurance contracts, if any; shall be the prosecuting officer in the municipal court unless the city council appoints a separate attorney or law firm to be the prosecuting officer as provided below; shall attend the meetings of the council as directed; shall advise the city council, mayor and other officers and employees of the city concerning legal aspects of the city's affairs; and shall perform such other duties as may be required by virtue of the person's position as city attorney. The city council may, in its discretion, appoint an attorney or law firm who is not the same person or law firm as the city attorney to serve as the prosecuting officer in the municipal court.