California Penal Code
(a) Defense counsel shall provide accurate and affirmative advice about the immigration consequences of a proposed disposition, and when consistent with the goals of and with the informed consent of the defendant, and consistent with professional
standards, defend against those consequences.
(b) The prosecution, in the interests of justice, and in furtherance of the findings and declarations of Section 1016.2, shall consider the avoidance of adverse immigration consequences in the plea negotiation process as one factor in an effort to reach a just resolution.
(c) This code section shall not be interpreted to change the requirements of Section 1016.5, including the requirement that no defendant shall be required to disclose his or her immigration status to the court.