Whenever the charter of any city creates the office of city prosecutor, or provides that a deputy city attorney shall act as city prosecutor, and charges such prosecutor with the duty, when authorized by law, of prosecuting misdemeanor offenses arising out of violations of state laws, the city prosecutor may exercise the following powers:
(a) The city prosecutor shall prosecute all such misdemeanors committed within the city, and handle all appeals arising from it. The city prosecutor shall draw complaints for such misdemeanors, and shall prosecute all recognizances or bail bond forfeitures arising from or resulting from the commission of such offenses.
(b) Whenever any person applying for a writ of habeas corpus is held in custody by any peace officer of such city, charged with having committed within the city any misdemeanor, a copy of the application for such writ shall be served upon such city prosecutor at the time and in the manner provided by law for the service of writs of habeas corpus upon district attorneys. On behalf of the people, the prosecutor shall conduct all proceedings relating to such application. If the constitutionality of any law is questioned in any such habeas corpus proceeding, the city prosecutor shall immediately notify the city attorney who may take charge of the proceedings on behalf of the people, or become associated with the city prosecutor in the proceedings.
(Amended by Stats. 1998, Ch. 931, Sec. 323. Effective September 28, 1998.)