(a) Except as provided in subdivisions (b) and (c), if the contempt consists of the omission to perform an act which is yet in the power of the person to perform, he or she may be imprisoned until he or she has performed it, and in that case the act shall be specified in the warrant of commitment.
(b) Notwithstanding any other law, a court shall not
imprison or otherwise confine or place in custody the victim of a sexual assault or domestic violence crime for contempt if the contempt consists of refusing to testify concerning that sexual assault or domestic violence crime. Before finding a victim of a domestic violence crime in contempt as described in this section, the court may refer the victim for consultation with a domestic violence counselor. All communications between the victim and the domestic violence counselor that occur as a result of that referral shall remain confidential under Section 1037.2 of the Evidence Code.
(c) Notwithstanding any other law, a court shall not imprison, hold in
physical confinement, or otherwise confine or place in custody a minor for contempt if the contempt consists of the minor’s failure to comply with a court order pursuant to subdivision (b) of Section 601 of, or Section 727 of, the Welfare and Institutions Code, if the minor was adjudged a ward of the court on the ground that he or she is a person described in subdivision (b) of Section 601 of the Welfare and Institutions Code. Upon a finding of contempt of court, the court may issue any other lawful order, as necessary, to secure the minor’s attendance at school.
(d) As used in this section, the following terms have the following meanings:
(1) “Sexual assault” means any act made punishable by Section 261, 262, 264.1, 285, 286, 288, 288a, or 289 of the Penal Code.
(2) “Domestic violence” means “domestic violence” as defined in Section 6211 of the Family Code.
(3) “Domestic violence counselor” means “domestic violence counselor” as defined in subdivision (a) of Section 1037.1 of the Evidence Code.
(4) “Physical confinement” has the same meaning as defined in subdivision (d) of Section 726 of the Welfare and Institutions Code.