“County peace officer” shall also include employees of the sheriff employed in a county jail, detention or correctional facility and having as their primary duty and responsibility the supervision and custody of persons committed to the jail or facility, whether or not these employees are deputized. It shall not include persons employed as clerks, typists, teachers, instructors, psychologists or to provide food, maintenance, health or supporting services, even though responsibility for custody and control of persons so committed may be incident to, or imposed in
connection with, that service or the employees are deputized.
This section shall not apply to any contracting agency nor to the employees of a contracting agency until the agency elects to be subject to this section by amendment to its contract with the board, made as provided in Section 20474 or by express provision in its contract with the board.