If a person has knowledge, or by the exercise of reasonable care, should have knowledge, that he is being arrested by a peace officer, it is the duty of such person to refrain from using force or any weapon to resist such arrest.
Ca. Pen. Code § 834a