858-883

PENAL CODE
SECTION 858-883




858.  When the defendant is brought before the magistrate upon an
arrest, either with or without warrant, on a charge of having
committed a public offense, the magistrate must immediately inform
him of the charge against him, and of his right to the aid of counsel
in every stage of the proceedings. If it appears that the defendant
may be a minor, the magistrate shall ascertain whether such is the
case, and if the magistrate concludes that it is probable that the
defendant is a minor, and unless the defendant is a member of the
armed forces of the United States and the offense charged is a
misdemeanor, he shall immediately either notify the parent or
guardian of the minor, by telephone, telegram, or messenger, of the
arrest, or appoint counsel to represent the minor.



858.5.  (a) In any case in which a defendant is, on his demand,
brought before a magistrate pursuant to Section 822 after arrest for
a misdemeanor Vehicle Code violation, the magistrate shall give such
instructions to the defendant as required by law and inform the
defendant of his rights under this section, and, if the defendant
desires to plead guilty or nolo contendere to the charge in the
complaint, he may so advise the magistrate. If the magistrate
determines that such plea would be in the interest of justice, he
shall direct the defendant to appear before a specified appropriate
court in the county in which defendant has been arrested at a
designated certain time, which in no case shall be more than 10
calendar days from the date of arrest, for plea and sentencing. The
magistrate shall request the court in which the complaint has been
filed to transmit a certified copy of the complaint and any citation
and any factual report which may have been prepared by the law
enforcement agency that investigated the case to the court in which
defendant is to appear for plea and sentencing. If the court of which
the request is made deems such action to be in the interest of
justice, and the district attorney of the county in which that court
sits, after notice from the court of the request it has received,
does not object to such action, the court shall immediately transmit
a certified copy of the complaint and the report of the law
enforcement agency that investigated the case, and, if not, shall
advise the requesting magistrate of its decision not to take such
action.
   When defendant appears for plea and sentencing, and if a copy of
the complaint has been transmitted, the court shall read the copy of
the complaint to him, and the defendant may plead guilty or nolo
contendere. Such court shall have jurisdiction to accept the plea and
impose a sentence. Such court shall notify the court in which the
complaint was originally filed of the disposition of the case. If
defendant does not plead guilty or nolo contendere, or if transmittal
of a copy of the complaint has been refused or if a copy of the
complaint has not been received, the court shall terminate the
proceedings under this section and shall direct the defendant to
appear before the court or magistrate by whom the warrant was issued
on or before a certain day which in no case shall be more than five
days after the date such direction is made.
   (b) Any fines imposed by a court which is given authority to
sentence pursuant to this section shall be remitted to the court in
which the complaint was originally filed for disposition as required
by law. The county of the sentencing court shall bear all costs
incurred incident to acceptance of the plea and sentencing, and no
part of such costs shall be deducted from the fine remitted to the
court in which the complaint was filed.


858.7.  (a) In any case in which the defendant has been convicted of
a misdemeanor and is serving a sentence as a result of such
conviction and there has been filed and is pending in another county
a complaint charging him with a misdemeanor Vehicle Code violation,
the defendant may appear before the court that sentenced him, and a
magistrate of that court shall give such instructions to the
defendant as required by law and inform the defendant of his rights
under this section, and, if the defendant desires to plead guilty or
nolo contendere to the charge in the complaint, he may so advise the
magistrate. If the magistrate determines that such plea would be in
the interest of justice, he shall direct the defendant to appear
before a specified appropriate court in the county in which defendant
is serving his sentence at a designated certain time for plea and
sentencing. The magistrate shall request the court in which the
complaint has been filed to transmit a certified copy of the
complaint and any citation and any factual report which may have been
prepared by the law enforcement agency that investigated the case to
the court in which defendant is to appear for plea and sentencing.
If the court of which the request is made deems such action to be in
the interest of justice, and the district attorney of the county in
which that court sits, after notice from the court of the request it
has received, does not object to such action, the court shall
immediately transmit a certified copy of the complaint and any report
of the law enforcement agency that investigated the case, and, if
not, shall advise the requesting magistrate of its decision not to
take such action.
   When defendant appears for plea and sentencing, and if a copy of
the complaint has been transmitted, the court shall read the copy of
the complaint to him, and the defendant may plead guilty or nolo
contendere. Such court shall have jurisdiction to accept the plea and
impose a sentence. Such court shall notify the court in which the
complaint was originally filed of the disposition of the case. If
defendant does not plead guilty or nolo contendere, or if transmittal
of a copy of the complaint has been refused or if a copy of the
complaint has not been received, the court shall terminate the
proceedings under this section and shall direct the defendant to
appear before the court in which the complaint was filed and is
pending on or before a certain day.
   (b) (1) Any fines imposed by a court which is given authority to
sentence pursuant to this section shall be remitted to the court in
which the complaint was originally filed for disposition as required
by law. Except as otherwise provided in paragraph (2) of this
subdivision, the county of the sentencing court shall bear all costs
incurred incident to acceptance of the plea and sentencing, and no
part of such costs shall be deducted from the fine remitted to the
court in which the complaint was filed.
   (2) In any case in which a defendant is sentenced to imprisonment
pursuant to this section, and as a result of such sentence he is
required to be imprisoned for a time in addition to, and not
concurrent with, the time he is imprisoned as a result of the
sentence he is otherwise serving, the county in which the complaint
was originally filed shall bear the cost of such additional time of
imprisonment that the defendant is required to serve. Such cost may
be deducted from any fine required to be remitted pursuant to
paragraph (1) of this subdivision to the court in which the complaint
was originally filed.
   (c) As used in this section, "complaint" includes, but is not
limited to, a notice to appear which is within the provisions of
Section 40513 of the Vehicle Code.


859.  When the defendant is charged with the commission of a felony
by a written complaint subscribed under oath and on file in a court
within the county in which the felony is triable, he or she shall,
without unnecessary delay, be taken before a magistrate of the court
in which the complaint is on file. The magistrate shall immediately
deliver to the defendant a copy of the complaint, inform the
defendant that he or she has the right to have the assistance of
counsel, ask the defendant if he or she desires the assistance of
counsel, and allow the defendant reasonable time to send for counsel.
However, in a capital case, the court shall inform the defendant
that the defendant must be represented in court by counsel at all
stages of the preliminary and trial proceedings and that the
representation will be at the defendant's expense if the defendant is
able to employ counsel or at public expense if he or she is unable
to employ counsel, inquire of him or her whether he or she is able to
employ counsel and, if so, whether the defendant desires to employ
counsel of the defendant's choice or to have counsel assigned for him
or her, and allow the defendant a reasonable time to send for his or
her chosen or assigned counsel. If the defendant desires and is
unable to employ counsel, the court shall assign counsel to defend
him or her; in a capital case, if the defendant is able to employ
counsel and either refuses to employ counsel or appears without
counsel after having had a reasonable time to employ counsel, the
court shall assign counsel to defend him or her. If it appears that
the defendant may be a minor, the magistrate shall ascertain whether
that is the case, and if the magistrate concludes that it is probable
that the defendant is a minor, he or she shall immediately either
notify the parent or guardian of the minor, by telephone or
messenger, of the arrest, or appoint counsel to represent the minor.




859.1.  (a) In any criminal proceeding in which the defendant is
charged with any offense specified in Section 868.8 on a minor under
the age of 16 years, or a dependent person with a substantial
cognitive impairment, as defined in paragraph (3) of subdivision (f)
of Section 288, the court shall, upon motion of the prosecuting
attorney, conduct a hearing to determine whether the testimony of,
and testimony relating to, a minor or dependent person shall be
closed to the public in order to protect the minor's or the dependent
person's reputation.
   (b) In making this determination, the court shall consider all of
the following:
   (1) The nature and seriousness of the offense.
   (2) The age of the minor, or the level of cognitive development of
the dependent person.
   (3) The extent to which the size of the community would preclude
the anonymity of the victim.
   (4) The likelihood of public opprobrium due to the status of the
victim.
   (5) Whether there is an overriding public interest in having an
open hearing.
   (6) Whether the prosecution has demonstrated a substantial
probability that the identity of the witness would otherwise be
disclosed to the public during that proceeding, and demonstrated a
substantial probability that the disclosure of his or her identity
would cause serious harm to the witness.
   (7) Whether the witness has disclosed information concerning the
case to the public through press conferences, public meetings, or
other means.
   (8) Other factors the court may deem necessary to protect the
interests of justice.



859a.  (a) If the public offense charged is a felony not punishable
with death, the magistrate shall immediately upon the appearance of
counsel for the defendant read the complaint to the defendant and ask
him or her whether he or she pleads guilty or not guilty to the
offense charged therein and to a previous conviction or convictions
of crime if charged. While the charge remains pending before the
magistrate and when the defendant's counsel is present, the defendant
may plead guilty to the offense charged, or, with the consent of the
magistrate and the district attorney or other counsel for the
people, plead nolo contendere to the offense charged or plead guilty
or nolo contendere to any other offense the commission of which is
necessarily included in that with which he or she is charged, or to
an attempt to commit the offense charged and to the previous
conviction or convictions of crime if charged upon a plea of guilty
or nolo contendere. The magistrate may then fix a reasonable bail as
provided by this code, and upon failure to deposit the bail or
surety, shall immediately commit the defendant to the sheriff. Upon
accepting the plea of guilty or nolo contendere the magistrate shall
certify the case, including a copy of all proceedings therein and any
testimony that in his or her discretion he or she may require to be
taken, to the court in which judgment is to be pronounced at the time
specified under subdivision (b), and thereupon the proceedings shall
be had as if the defendant had pleaded guilty in that court. This
subdivision shall not be construed to authorize the receiving of a
plea of guilty or nolo contendere from any defendant not represented
by counsel. If the defendant subsequently files a written motion to
withdraw the plea under Section 1018, the motion shall be heard and
determined by the court before which the plea was entered.
   (b) Notwithstanding Section 1191 or 1203, the magistrate shall,
upon the receipt of a plea of guilty or nolo contendere and upon the
performance of the other duties of the magistrate under this section,
immediately appoint a time for pronouncing judgment in the superior
court and refer the case to the probation officer if eligible for
probation, as prescribed in Section 1191.



859b.  At the time the defendant appears before the magistrate for
arraignment, if the public offense is a felony to which the defendant
has not pleaded guilty in accordance with Section 859a, the
magistrate, immediately upon the appearance of counsel, or if none
appears, after waiting a reasonable time therefor as provided in
Section 859, shall set a time for the examination of the case and
shall allow not less than two days, excluding Sundays and holidays,
for the district attorney and the defendant to prepare for the
examination. The magistrate shall also issue subpoenas, duly
subscribed, for witnesses within the state, required either by the
prosecution or the defense.
   Both the defendant and the people have the right to a preliminary
examination at the earliest possible time, and unless both waive that
right or good cause for a continuance is found as provided for in
Section 1050, the preliminary examination shall be held within 10
court days of the date the defendant is arraigned or pleads,
whichever occurs later, or within 10 court days of the date criminal
proceedings are reinstated pursuant to Chapter 6 (commencing with
Section 1367) of Title 10 of Part 2.
   Whenever the defendant is in custody, the magistrate shall dismiss
the complaint if the preliminary examination is set or continued
beyond 10 court days from the time of the arraignment, plea, or
reinstatement of criminal proceedings pursuant to Chapter 6
(commencing with Section 1367) of Title 10 of Part 2, and the
defendant has remained in custody for 10 or more court days solely on
that complaint, unless either of the following occur:
   (a) The defendant personally waives his or her right to
preliminary examination within the 10 court days.
   (b) The prosecution establishes good cause for a continuance
beyond the 10-court-day period.
   For purposes of this subdivision, "good cause" includes, but is
not limited to, those cases involving allegations that a violation of
one or more of the sections specified in subdivision (a) of Section
11165.1 or in Section 11165.6 has occurred and the prosecuting
attorney assigned to the case has another trial, preliminary hearing,
or motion to suppress in progress in that court or another court.
Any continuance under this paragraph shall be limited to a maximum of
three additional court days.
   If the preliminary examination is set or continued beyond the
10-court-day period, the defendant shall be released pursuant to
Section 1318 unless:
   (1) The defendant requests the setting of continuance of the
preliminary examination beyond the 10-court-day period.
   (2) The defendant is charged with a capital offense in a cause
where the proof is evident and the presumption great.
   (3) A witness necessary for the preliminary examination is
unavailable due to the actions of the defendant.
   (4) The illness of counsel.
   (5) The unexpected engagement of counsel in a jury trial.
   (6) Unforeseen conflicts of interest which require appointment of
new counsel.
   The magistrate shall dismiss the complaint if the preliminary
examination is set or continued more than 60 days from the date of
the arraignment, plea, or reinstatement of criminal proceedings
pursuant to Chapter 6 (commencing with Section 1367) of Title 10 of
Part 2, unless the defendant personally waives his or her right to a
preliminary examination within the 60 days.



859c.  Procedures under this code that provide for superior court
review of a challenged ruling or order made by a superior court judge
or a magistrate shall be performed by a superior court judge other
than the judge or magistrate who originally made the ruling or order,
unless agreed to by the parties.


860.  At the time set for the examination of the case, if the public
offense is a felony punishable with death, or is a felony to which
the defendant has not pleaded guilty in accordance with Section 859a
of this code, then, if the defendant requires the aid of counsel, the
magistrate must allow the defendant a reasonable time to send for
counsel, and may postpone the examination for not less than two nor
more than five days for that purpose. The magistrate must,
immediately after the appearance of counsel, or if, after waiting a
reasonable time therefor, none appears, proceed to examine the case;
provided, however, that a defendant represented by counsel may when
brought before the magistrate as provided in Section 858 or at any
time subsequent thereto, waive the right to an examination before
such magistrate, and thereupon it shall be the duty of the magistrate
to make an order holding the defendant to answer, and it shall be
the duty of the district attorney within 15 days thereafter, to file
in the superior court of the county in which the offense is triable
the information; provided, further, however, that nothing contained
herein shall prevent the district attorney nor the magistrate from
requiring that an examination be held as provided in this chapter.




861.  (a) The preliminary examination shall be completed at one
session or the complaint shall be dismissed, unless the magistrate,
for good cause shown by affidavit, postpones it. The postponement
shall not be for more than 10 court days, unless either of the
following occur:
   (1) The defendant personally waives his or her right to a
continuous preliminary examination.
   (2) The prosecution establishes good cause for a postponement
beyond the 10-court-day period. If the magistrate postpones the
preliminary examination beyond the 10-court-day period, and the
defendant is in custody, the defendant shall be released pursuant to
subdivision (b) of Section 859b.
   (b) The preliminary examination shall not be postponed beyond 60
days from the date the motion to postpone the examination is granted,
unless by consent or on motion of the defendant.
   (c) Nothing in this section shall preclude the magistrate from
interrupting the preliminary examination to conduct brief court
matters so long as a substantial majority of the court's time is
devoted to the preliminary examination.
   (d) A request for a continuance of the preliminary examination
that is made by the defendant or his or her attorney of record for
the purpose of filing a motion pursuant to paragraph (2) of
subdivision (f) of Section 1538.5 shall be deemed a personal waiver
of the defendant's right to a continuous preliminary examination.



861.5.  Notwithstanding subdivision (a) of Section 861, the
magistrate may postpone the preliminary examination for one court day
in order to accommodate the special physical, mental, or emotional
needs of a child witness who is 10 years of age or younger or a
dependent person, as defined in paragraph (3) of subdivision (f) of
Section 288.
   The magistrate shall admonish both the prosecution and defense
against coaching the witness prior to the witness' next appearance in
the preliminary examination.



862.  If a postponement is had, the magistrate must commit the
defendant for examination, admit him to bail or discharge him from
custody upon the deposit of money as provided in this Code, as
security for his appearance at the time to which the examination is
postponed.



863.  The commitment for examination is made by an indorsement,
signed by the magistrate on the warrant of arrest, to the following
effect: "The within named A. B. having been brought before me under
this warrant, is committed for examination to the Sheriff of ____."
If the Sheriff is not present, the defendant may be committed to the
custody of a peace officer.



864.  At the examination, the magistrate must first read to the
defendant the depositions of the witnesses examined on taking the
information.


865.  The witnesses must be examined in the presence of the
defendant, and may be cross-examined in his behalf.



866.  (a) When the examination of witnesses on the part of the
people is closed, any witness the defendant may produce shall be
sworn and examined.
   Upon the request of the prosecuting attorney, the magistrate shall
require an offer of proof from the defense as to the testimony
expected from the witness. The magistrate shall not permit the
testimony of any defense witness unless the offer of proof discloses
to the satisfaction of the magistrate, in his or her sound
discretion, that the testimony of that witness, if believed, would be
reasonably likely to establish an affirmative defense, negate an
element of a crime charged, or impeach the testimony of a prosecution
witness or the statement of a declarant testified to by a
prosecution witness.
   (b) It is the purpose of a preliminary examination to establish
whether there exists probable cause to believe that the defendant has
committed a felony. The examination shall not be used for purposes
of discovery.
   (c) This section shall not be construed to compel or authorize the
taking of depositions of witnesses.



866.5.  The defendant may not be examined at the examination, unless
he is represented by counsel, or unless he waives his right to
counsel after being advised at such examination of his right to aid
of counsel.


867.  While a witness is under examination, the magistrate shall,
upon motion of either party, exclude all potential and actual witness
who have not been examined.
   The magistrate shall also order the witnesses not to converse with
each other until they are all examined. The magistrate may also
order, where feasible, that the witnesses be kept separated from each
other until they are all examined.
   This section does not apply to the investigating officer or the
investigator for the defendant, nor does it apply to officers having
custody of persons brought before the magistrate.
   Either party may challenge the exclusion of any person under this
section. Upon motion of either party, the magistrate shall hold a
hearing, on the record, to determine if the person sought to be
excluded is, in fact, a person excludable under this section.



868.  The examination shall be open and public. However, upon the
request of the defendant and a finding by the magistrate that
exclusion of the public is necessary in order to protect the
defendant's right to a fair and impartial trial, the magistrate shall
exclude from the examination every person except the clerk, court
reporter and bailiff, the prosecutor and his or her counsel, the
Attorney General, the district attorney of the county, the
investigating officer, the officer having custody of a prisoner
witness while the prisoner is testifying, the defendant and his or
her counsel, the officer having the defendant in custody, and a
person chosen by the prosecuting witness who is not himself or
herself a witness but who is present to provide the prosecuting
witness moral support, provided that the person so chosen shall not
discuss prior to or during the preliminary examination the testimony
of the prosecuting witness with any person, other than the
prosecuting witness, who is a witness in the examination. Upon motion
of the prosecution, members of the alleged victim's family shall be
entitled to be present and seated during the examination. The court
shall grant the motion unless the magistrate finds that the exclusion
is necessary to protect the defendant's right to a fair and
impartial trial, or unless information provided by the defendant or
noticed by the court establishes that there is a reasonable
likelihood that the attendance of members of the alleged victim's
family poses a risk of affecting the content of the testimony of the
victim or any other witness. The court shall admonish members of the
alleged victim's family who are present and seated during the
examination not to discuss any testimony with family members,
witnesses, or the public. Nothing in this section shall affect the
exclusion of witnesses as provided in Section 867 of the Penal Code.
   For purposes of this section, members of the alleged victim's
family shall include the alleged victim's spouse, parents, legal
guardian, children, or siblings.



868.5.  (a) Notwithstanding any other law, a prosecuting witness in
a case involving a violation of Section 187, 203, 205, 207, 211, 215,
220, 240, 242, 243.4, 245, 261, 262, 273a, 273d, 273.5, 273.6, 278,
278.5, 285, 286, 288, 288a, 288.5, 289, or 647.6, former Section 277
or 647a, subdivision (1) of Section 314, or subdivision (b), (d), or
(e) of Section 368 when the prosecuting witness is the elder or
dependent adult, shall be entitled, for support, to the attendance of
up to two persons of his or her own choosing, one of whom may be a
witness, at the preliminary hearing and at the trial, or at a
juvenile court proceeding, during the testimony of the prosecuting
witness. Only one of those support persons may accompany the witness
to the witness stand, although the other may remain in the courtroom
during the witness' testimony. The person or persons so chosen shall
not be a person described in Section 1070 of the Evidence Code unless
the person or persons are related to the prosecuting witness as a
parent, guardian, or sibling and do not make notes during the hearing
or proceeding.
   (b) If the person or persons so chosen are also witnesses, the
prosecution shall present evidence that the person's attendance is
both desired by the prosecuting witness for support and will be
helpful to the prosecuting witness. Upon that showing, the court
shall grant the request unless information presented by the defendant
or noticed by the court establishes that the support person's
attendance during the testimony of the prosecuting witness would pose
a substantial risk of influencing or affecting the content of that
testimony. In the case of a juvenile court proceeding, the judge
shall inform the support person or persons that juvenile court
proceedings are confidential and may not be discussed with anyone not
in attendance at the proceedings. In all cases, the judge shall
admonish the support person or persons to not prompt, sway, or
influence the witness in any way. Nothing in this section shall
preclude a court from exercising its discretion to remove a person
from the courtroom whom it believes is prompting, swaying, or
influencing the witness.
   (c) The testimony of the person or persons so chosen who are also
witnesses shall be presented before the testimony of the prosecuting
witness. The prosecuting witness shall be excluded from the courtroom
during that testimony. Whenever the evidence given by that person or
those persons would be subject to exclusion because it has been
given before the corpus delicti has been established, the evidence
shall be admitted subject to the court's or the defendant's motion to
strike that evidence from the record if the corpus delicti is not
later established by the testimony of the prosecuting witness.



868.6.  (a) It is the purpose of this section to provide a
nonthreatening environment for minors involved in the judicial system
in order to better enable them to speak freely and accurately of the
experiences that are the subject of judicial inquiry.
   (b) Each county is encouraged to provide a room, located within,
or within a reasonable distance from, the courthouse, for the use of
minors under the age of 16. Should any such room reach full
occupancy, preference shall be given to minors under the age of 16
whose appearance has been subpoenaed by the court. The room may be
multipurpose in character. The county may seek the assistance of
civic groups in the furnishing of the room and the provision of
volunteers to aid in its operation and maintenance. If a county newly
constructs, substantially remodels or refurbishes any courthouse or
facility used as a courthouse on or after January 1, 1988, that
courthouse or facility shall contain the room described in this
subdivision.



868.7.  (a) Notwithstanding any other provision of law, the
magistrate may, upon motion of the prosecutor, close the examination
in the manner described in Section 868 during the testimony of a
witness:
   (1) Who is a minor or a dependent person, as defined in paragraph
(3) of subdivision (f) of Section 288, with a substantial cognitive
impairment and is the complaining victim of a sex offense, where
testimony before the general public would be likely to cause serious
psychological harm to the witness and where no alternative
procedures, including, but not limited to, video recorded deposition
or contemporaneous examination in another place communicated to the
courtroom by means of closed-circuit television, are available to
avoid the perceived harm.
   (2) Whose life would be subject to a substantial risk in appearing
before the general public, and where no alternative security
measures, including, but not limited to, efforts to conceal his or
her features or physical description, searches of members of the
public attending the examination, or the temporary exclusion of other
actual or potential witnesses, would be adequate to minimize the
perceived threat.
   (b) In any case where public access to the courtroom is restricted
during the examination of a witness pursuant to this section, a
transcript of the testimony of the witness shall be made available to
the public as soon as is practicable.



868.8.  Notwithstanding any other provision of law, in any criminal
proceeding in which the defendant is charged with a violation of
Section 243.4, 261, 273a, 273d, 285, 286, 288, 288a, 288.5, or 289,
subdivision (1) of Section 314, Section 647.6, or former Section
647a, or any crime that constitutes domestic violence defined in
Section 13700, committed with or upon a person with a disability or a
minor under the age of 11, the court shall take special precautions
to provide for the comfort and support of the person with a
disability or minor and to protect him or her from coercion,
intimidation, or undue influence as a witness, including, but not
limited to, any of the following:
   (a) In the court's discretion, the witness may be allowed
reasonable periods of relief from examination and cross-examination
during which he or she may retire from the courtroom. The judge may
also allow other witnesses in the proceeding to be examined when the
person with a disability or child witness retires from the courtroom.
   (b) Notwithstanding Section 68110 of the Government Code, in his
or her discretion, the judge may remove his or her robe if the judge
believes that this formal attire intimidates the person with a
disability or the minor.
   (c) In the court's discretion the judge, parties, witnesses,
support persons, and court personnel may be relocated within the
courtroom to facilitate a more comfortable and personal environment
for the person with a disability or child witness.
   (d) In the court's discretion, the taking of the testimony of the
person with a disability or the minor may be limited to normal school
hours if there is no good cause to take the testimony of the person
with a disability or the minor during other hours.
   (e) For the purposes of this section, the term "disability" is
defined in subdivision (i) of Section 12926 of the Government Code.



869.  The testimony of each witness in cases of homicide shall be
reduced to writing, as a deposition, by the magistrate, or under his
or her direction, and in other cases upon the demand of the
prosecuting attorney, or the defendant, or his or her counsel. The
magistrate before whom the examination is had may, in his or her
discretion, order the testimony and proceedings to be taken down in
shorthand in all examinations herein mentioned, and for that purpose
he or she may appoint a shorthand reporter. The deposition or
testimony of the witness shall be authenticated in the following
form:
   (a) It shall state the name of the witness, his or her place of
residence, and his or her business or profession; except that if the
witness is a peace officer, it shall state his or her name, and the
address given in his or her testimony at the hearing.
   (b) It shall contain the questions put to the witness and his or
her answers thereto, each answer being distinctly read to him or her
as it is taken down, and being corrected or added to until it
conforms to what he or she declares is the truth, except in cases
where the testimony is taken down in shorthand, the answer or answers
of the witness need not be read to him or her.
   (c) If a question put be objected to on either side and overruled,
or the witness declines answering it, that fact, with the ground on
which the question was overruled or the answer declined, shall be
stated.
   (d) The deposition shall be signed by the witness, or if he or she
refuses to sign it, his or her reason for refusing shall be stated
in writing, as he or she gives it, except in cases where the
deposition is taken down in shorthand, it need not be signed by the
witness.
   (e) The reporter shall, within 10 days after the close of the
examination, if the defendant be held to answer the charge of a
felony, or in any other case if either the defendant or the
prosecution orders the transcript, transcribe his or her shorthand
notes, making an original and one copy and as many additional copies
thereof as there are defendants (other than fictitious defendants),
regardless of the number of charges or fictitious defendants included
in the same examination, and certify and deliver the original and
all copies to the clerk of the superior court in the county in which
the defendant was examined. The reporter shall, before receiving any
compensation as a reporter, file his or her affidavit setting forth
that the transcript has been delivered within the time herein
provided for. The compensation of the reporter for any services
rendered by him or her as the reporter in any court of this state
shall be reduced one-half if the provisions of this section as to the
time of filing said transcript have not been complied with by him or
her.
   (f) In every case in which a transcript is delivered as provided
in this section, the clerk of the court shall file the original of
the transcript with the papers in the case, and shall deliver a copy
of the transcript to the district attorney immediately upon his or
her receipt thereof and shall deliver a copy of said transcript to
each defendant (other than a fictitious defendant) at least five days
before trial or upon earlier demand by him or her without cost to
him or her; provided, that if any defendant be held to answer to two
or more charges upon the same examination and thereafter the district
attorney shall file separate informations upon said several charges,
the delivery to each such defendant of one copy of the transcript of
the examination shall be a compliance with this section as to all of
those informations.
   (g) If the transcript is delivered by the reporter within the time
hereinbefore provided for, the reporter shall be entitled to receive
the compensation fixed and allowed by law to reporters in the
superior courts of this state.



870.  The magistrate or his or her clerk shall keep the depositions
taken on the information or the examination, until they are returned
to the proper court; and shall not permit them to be examined or
copied by any person except a judge of a court having jurisdiction of
the offense, or authorized to issue writs of habeas corpus, the
Attorney General, district attorney, or other prosecuting attorney,
and the defendant and his or her counsel; provided however, upon
demand by the defendant or his or her attorney the magistrate shall
order a transcript of the depositions taken on the information, or on
the examination, to be immediately furnished the defendant or his or
her attorney, after the commitment of the defendant as provided by
Sections 876 and 877, and the reporter furnishing the depositions,
shall receive compensation in accordance with Section 869.



871.  If, after hearing the proofs, it appears either that no public
offense has been committed or that there is not sufficient cause to
believe the defendant guilty of a public offense, the magistrate
shall order the complaint dismissed and the defendant to be
discharged, by an indorsement on the depositions and statement,
signed by the magistrate, to the following effect: "There being no
sufficient cause to believe the within named A. B. guilty of the
offense within mentioned, I order that the complaint be dismissed and
that he or she shall be discharged."



871.5.  (a) When an action is dismissed by a magistrate pursuant to
Section 859b, 861, 871, 1008, 1381, 1381.5, 1385, 1387, or 1389 of
this code or Section 41403 of the Vehicle Code, or a portion thereof
is dismissed pursuant to those same sections which may not be charged
by information under Section 739, the prosecutor may make a motion
in the superior court within 15 days to compel the magistrate to
reinstate the complaint or a portion thereof and to reinstate the
custodial status of the defendant under the same terms and conditions
as when the defendant last appeared before the magistrate.
   (b) Notice of the motion shall be made to the defendant and the
magistrate. The only ground for the motion shall be that, as a matter
of law, the magistrate erroneously dismissed the action or a portion
thereof.
   (c) The superior court shall hear and determine the motion on the
basis of the record of the proceedings before the magistrate. If the
motion is litigated to decision by the prosecutor, the prosecution is
prohibited from refiling the dismissed action, or portion thereof.
   (d) Within 10 days after the magistrate has dismissed the action
or a portion thereof, the prosecuting attorney may file a written
request for a transcript of the proceedings with the clerk of the
magistrate. The reporter shall immediately transcribe his or her
shorthand notes pursuant to Section 869 and file with the clerk of
the superior court an original plus one copy, and as many copies as
there are defendants (other than a fictitious defendant). The
reporter shall be entitled to compensation in accordance with Section
869. The clerk of the superior court shall deliver a copy of the
transcript to the prosecuting attorney immediately upon its receipt
and shall deliver a copy of the transcript to each defendant (other
than a fictitious defendant) upon his or her demand without cost.
   (e) When a court has ordered the resumption of proceedings before
the magistrate, the magistrate shall resume the proceedings and when
so ordered, issue an order of commitment for the reinstated offense
or offenses within 10 days after the superior court has entered an
order to that effect or within 10 days after the remittitur is filed
in the superior court. Upon receipt of the remittitur, the superior
court shall forward a copy to the magistrate.
   (f) Pursuant to paragraph (9) of subdivision (a) of Section 1238
the people may take an appeal from the denial of the motion by the
superior court to reinstate the complaint or a portion thereof. If
the motion to reinstate the complaint is granted, the defendant may
seek review thereof only pursuant to Sections 995 and 999a. That
review may only be sought in the event the defendant is held to
answer pursuant to Section 872.
   (g) Nothing contained herein shall preclude a magistrate, upon the
resumption of proceedings, from considering a motion made pursuant
to Section 1318.
   If the superior court grants the motion for reinstatement and
orders the magistrate to issue an order of commitment, the defendant,
in lieu of resumed proceedings before the magistrate, may elect to
waive his or her right to be committed by a magistrate, and consent
to the filing of an amended or initial information containing the
reinstated charge or charges. After arraignment thereon, he or she
may adopt as a motion pursuant to Section 995, the record and
proceedings of the motion taken pursuant to this section and the
order issued pursuant thereto, and may seek review of the order in
the manner prescribed in Section 999a.



871.6.  If in a felony case the magistrate sets the preliminary
examination beyond the time specified in Section 859b, in violation
of Section 859b, or continues the preliminary hearing without good
cause and good cause is required by law for such a continuance, the
people or the defendant may file a petition for writ of mandate or
prohibition in the superior court seeking immediate appellate review
of the ruling setting the hearing or granting the continuance. Such a
petition shall have precedence over all other cases in the court to
which the petition is assigned. If the superior court grants a
peremptory writ, it shall issue the writ and a remittitur three court
days after its decision becomes final as to the court if this action
is necessary to prevent mootness or to prevent frustration of the
relief granted, notwithstanding the rights of the parties to seek
review in a court of appeal. When the superior court issues the writ
and remittitur as provided in this section, the writ shall command
the magistrate to proceed with the preliminary hearing without
further delay, other than that reasonably necessary for the parties
to obtain the attendance of their witnesses.
   The court of appeal may stay or recall the issuance of the writ
and remittitur. The failure of the court of appeal to stay or recall
the issuance of the writ and remittitur shall not deprive the parties
of any right they would otherwise have to appellate review or
extraordinary relief.



872.  (a) If, however, it appears from the examination that a public
offense has been committed, and there is sufficient cause to believe
that the defendant is guilty, the magistrate shall make or indorse
on the complaint an order, signed by him or her, to the following
effect: "It appearing to me that the offense in the within complaint
mentioned (or any offense, according to the fact, stating generally
the nature thereof), has been committed, and that there is sufficient
cause to believe that the within named A. B. is guilty, I order that
he or she be held to answer to the same."
   (b) Notwithstanding Section 1200 of the Evidence Code, the finding
of probable cause may be based in whole or in part upon the sworn
testimony of a law enforcement officer or honorably retired law
enforcement officer relating the statements of declarants made out of
court offered for the truth of the matter asserted. An honorably
retired law enforcement officer may only relate statements of
declarants made out of court and offered for the truth of the matter
asserted that were made when the honorably retired officer was an
active law enforcement officer. Any law enforcement officer or
honorably retired law enforcement officer testifying as to hearsay
statements shall either have five years of law enforcement experience
or have completed a training course certified by the Commission on
Peace Officer Standards and Training that includes training in the
investigation and reporting of cases and testifying at preliminary
hearings.



872.5.  Notwithstanding Article 1 (commencing with Section 1520) of
Chapter 2 of Division 11 of the Evidence Code, in a preliminary
examination the content of a writing may be proved by an otherwise
admissible original or otherwise admissible secondary evidence.




873.  If the offense is not bailable, the following words must be
added to the indorsement: "And he is hereby committed to the Sheriff
of the County of ____. "



875.  If the offense is bailable, and the defendant is admitted to
bail, the following words must be added to the order, "and that he be
admitted to bail in the sum of ____ dollars, and is committed to the
Sheriff of the County of ____ until he gives such bail."



876.  If the magistrate order the defendant to be committed, he must
make out a commitment, signed by him, with his name of office, and
deliver it, with the defendant, to the officer to whom he is
committed, or, if that officer is not present, to a peace officer,
who must deliver the defendant into the proper custody, together with
the commitment.



877.  The commitment must be to the following effect except when it
is made under the provisions of section 859a of this code.

   County of ____ (as the case may be).
   The people of the State of California to the sheriff of the county
of ____:
   An order having been this day made by me, that A. B. be held to
answer upon a charge of (stating briefly the nature of the offense,
and giving as near as may be the time when and the place where the
same was committed), you are commanded to receive him into your
custody and detain him until he is legally discharged.
   Dated this ____ day of ____ nineteen ____.



877a.  When the commitment is made under the provisions of section
859a of this code, it must be made to the following effect:

   County of ____ (as the case may be).
   The people of the State of California to the sheriff of the county
of ____.
   A. B. having pleaded guilty to the offense of (stating briefly the
nature of the offense, and giving as near as may be the time when
and the place where the same was committed), you are commanded to
receive him into your custody and detain him until he is legally
discharged.
   Dated this ____ day of ____ nineteen ____.




878.  On holding the defendant to answer or on a plea of guilty
where permitted by law, the magistrate may take from each of the
material witnesses examined before him on the part of the people a
written undertaking, to the effect that he will appear and testify at
the court to which the depositions and statements or case are to be
sent, or that he will forfeit the sum of five hundred dollars.



879.  When the magistrate or a Judge of the Court in which the
action is pending is satisfied, by proof on oath, that there is
reason to believe that any such witness will not appear and testify
unless security is required, he may order the witness to enter into a
written undertaking, with sureties, in such sum as he may deem
proper, for his appearance as specified in the preceding section.



880.  Infants who are material witnesses against the defendant may
be required to procure sureties for their appearance, as provided in
the last section.


881.  (a) If a witness, required to enter into an undertaking to
appear and testify, either with or without sureties, refuses
compliance with the order for that purpose, the magistrate shall
commit him or her to prison until he or she complies or is legally
discharged.
   (b) If a witness fails to appear at the preliminary hearing in
response to a subpoena, the court may hear evidence, including
testimony or an affidavit from the arresting or interviewing officer,
and if the court determines on the basis of the evidence that the
witness is a material witness, the court shall issue a bench warrant
for the arrest of the witness, and upon the appearance of the
witness, may commit him or her into custody until the conclusion of
the preliminary hearing, or until the defendant enters a plea of nolo
contendere, or the witness is otherwise legally discharged.
   The court may order the witness to enter into a written
undertaking to the effect that he or she will appear and testify at
the time and place ordered by the court or that he or she will
forfeit an amount that the court deems proper.
   (c) Once the material witness has been taken into custody on the
bench warrant he or she shall be brought before the magistrate
issuing the warrant, if available, within two court days for a
hearing to determine if the witness should be released on security of
appearance or maintained in custody.
   (d) A material witness shall remain in custody under this section
for no longer than 10 days.
   (e) If a material witness is being held in custody under this
section the prosecution is entitled to have the preliminary hearing
proceed, as to this witness only, within 10 days of the arraignment
of the defendant. Once this material witness has completed his or her
testimony the defendant shall be entitled to a reasonable
continuance.



882.  When, however, it satisfactorily appears by examination, on
oath of the witness, or any other person, that the witness is unable
to procure sureties, he or she may be forthwith conditionally
examined on behalf of the people. The examination shall be by
question and answer, in the presence of the defendant, or after
notice to him or her, if on bail, and conducted in the same manner as
the examination before a committing magistrate is required by this
code to be conducted, and the witness thereupon discharged; and the
deposition may be used upon the trial of the defendant, except in
cases of homicide, under the same conditions as mentioned in Section
1345; but this section does not apply to an accomplice in the
commission of the offense charged.



883.  When a magistrate has discharged a defendant, or has held him
to answer, he must return, without delay, to the Clerk of the Court
at which the defendant is required to appear, the warrant, if any,
the depositions, and all undertakings of bail, or for the appearance
of witnesses taken by him.