Upon the filing of the petition, the court shall determine the name of the attorney the patient has retained to represent the patient in the proceeding under this part or the name of the attorney the patient plans to retain for that purpose. If the patient has not retained an attorney and does not plan to retain one, the court shall appoint the public defender or private counsel under Section 1471 to consult with and represent the patient at the hearing on the petition and, if such appointment is made, Section 1472 applies.
Ca. Prob. Code § 3205