Cal. Penal Code § 667.7
(a) Any person convicted of a felony in which the person inflicted great bodily injury as provided in Section 12022.53 or 12022.7, or personally used force which was likely to produce great bodily injury, who has served two or more prior separate prison terms as defined in Section 667.5 for the crime of murder; attempted murder; voluntary manslaughter; mayhem; rape by force, violence, or fear of immediate and unlawful bodily injury on the victim or another person; oral copulation by force, violence, duress, menace, or fear of immediate and unlawful bodily injury on the victim or another person; sodomy by force, violence, duress, menace, or fear of immediate and unlawful bodily injury on the victim or another person; lewd acts on a child under the age of 14 years by use of force, violence, duress, menace, or fear of immediate and unlawful bodily injury on the victim or another person; a violation of subdivision (a) of Section 289 where the act is accomplished against the victim’s will by means of force, violence, duress, menace, or fear of immediate and unlawful bodily injury on the victim or another person; kidnapping as punished in former subdivision (d) of Section 208, or for ransom, extortion, or robbery; robbery involving the use of force or a deadly weapon; carjacking involving the use of a deadly weapon; assault with intent to commit murder; assault with a deadly weapon; assault with a force likely to produce great bodily injury; assault with intent to commit rape, sodomy, oral copulation, sexual penetration in violation of Section 289, or lewd and lascivious acts on a child; arson of a structure; escape or attempted escape by an inmate with force or violence in violation of subdivision (a) of Section 4530, or of Section 4532; exploding a destructive device with intent to murder in violation of Section 18745; exploding a destructive device which causes bodily injury in violation of Section 18750, or mayhem or great bodily injury in violation of Section 18755; exploding a destructive device with intent to injure, intimidate, or terrify, in violation of Section 18740; any felony in which the person inflicted great bodily injury as provided in Section 12022.53 or 12022.7; or any felony punishable by death or life imprisonment with or without the possibility of parole is a habitual offender and shall be punished as follows: