(a)
Whenever a person who is in custody enters a guilty plea to an infraction or misdemeanor under this code and there is outstanding any warrant of arrest for a violation of this code or a local ordinance adopted pursuant to this code that is filed in any court within the same county, the defendant may elect to enter a guilty plea to any of these charged offenses of which the court has a record, except offenses specified in subdivision (b). The court shall sentence the defendant for each of the offenses for which a guilty plea has been entered pursuant to this section, and shall notify the appropriate court or department in each affected judicial district of the disposition. After receiving that notice of disposition, the court in which each complaint was filed shall prepare and transmit to the department any certification required by applicable provisions of Section 40509 as if the court had heard the case.
(b)
Subdivision (a) does not authorize entry of a guilty plea as specified in that subdivision to an offense for which a notice of parking violation has been issued, nor to any offense specified in Section 14601.2, 14601.3, 20002, 23103, 23104, 23105, 23152, or 23153, subdivision (a) of Section 14601, or subdivision (a) of Section 14601.1.