Any person, except a duly appointed peace officer as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2, a full-time paid peace officer of another state or the federal government who is carrying out official duties while in California, any person summoned by that officer to assist in making arrests or preserving the peace while they are actually engaged in assisting the officer, a member of the military forces of this state or of the United States engaged in the performance of their duties, the Governor or a member of their immediate family or a person acting with their permission with respect to the Governor's Mansion or any other residence of the Governor, any other constitutional officer or a member of their immediate family or a person acting with their permission with respect to the officer's residence, or a Member of the Legislature or a member of their immediate family or a person acting with their permission with respect to the Member's residence, shall be punished by imprisonment in a county jail for not more than one year, by a fine of not more than one thousand dollars ($1,000), or by both the fine and imprisonment, or by imprisonment pursuant to subdivision (h) of Section 1170, if they do either of the following:
Ca. Pen. Code § 171d