(a)
(1)Except as provided in paragraph (2), the defendant shall in all cases be taken before the magistrate without unnecessary delay, and, in any event, within 48 hours after his or her arrest, excluding Sundays and holidays.
(2)
When the 48 hours prescribed by paragraph (1) expire at a time when the court in which the magistrate is sitting is not in session, that time shall be extended to include the duration of the next court session on the judicial day
immediately following. If the 48-hour period expires at a time when the court in which the magistrate is sitting is in session, the arraignment may take place at any time during that session. However, when the defendant’s arrest occurs on a Wednesday after the conclusion of the day’s court session, and if the Wednesday is not a court holiday, the defendant shall be taken before the magistrate not later than the following Friday, if the Friday is not a court holiday.
(b)
After the arrest, any attorney at law entitled to practice in the courts of record of California, may, at the request of the prisoner or any relative of the prisoner, visit the prisoner. Any officer having charge of the prisoner who willfully refuses or neglects to allow that attorney to visit a prisoner is guilty of a misdemeanor. Any officer having a prisoner in charge, who refuses to allow the attorney to visit the prisoner when proper application is made, shall forfeit and
pay to the party aggrieved the sum of five hundred dollars ($500), to be recovered by action in any court of competent jurisdiction.