A board of supervisors may contract with a city, governed under general laws or charter, within the county, and the city legislative body may contract with the county for the performance by its appropriate officers and employees, of city functions.
Ca. Gov. Code § 51301