The only thing I can think of that kind of compares would be to ask you to image that your neighbor is having some words with a cop outside his house on the street. You see a calm conversation and then watch the cop suddenly pull out his asp and start beating the ever living piss out of your neighbor. If you stop the cop, you are in the wrong and will also go to jail after catching some of that beating yourself... but stopping the beating would be the right thing to do. You would, however, be guilty of assaulting an officer, obstruction, and resisting arrest before you even set foot in a courtroom. A guilty verdict does not exonerate the cop for assaulting the citizen, but nothing bad is going to happen to him.