Business and Professions Code section 6131
(a)
Who directly or indirectly advises in relation to, or aids, or promotes the defense of any action or proceeding in any court the prosecution of which is carried on, aided or promoted by any person as district attorney or other public prosecutor with whom such person is directly or indirectly connected as a partner.(b)
Who, having himself prosecuted or in any manner aided or promoted any action or proceeding in any court as district attorney or other public prosecutor, afterwards, directly or indirectly, advises in relation to or takes any part in the defense thereof, as attorney or otherwise, or who takes or receives any valuable consideration from or on behalf of any defendant in any such action upon any understanding or agreement whatever having relation to the defense thereof.
Source:
Section 6131, https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=BPC§ionNum=6131.
(accessed Apr. 24, 2025).