Cal. Gov't Code § 26543
A district attorney or county counsel shall not during his incumbency act as counsel for any private plaintiff in any action or proceeding in which a city, district, or political subdivision of the State is a party defendant.