Homicide is justifiable if committed by a law enforcement officer or by any person acting by command of a law enforcement officer in the aid and assistance of that officer:
(1) If necessarily committed in overcoming actual resistance to the execution of some legal process, or to the discharge of any other legal duty; or
(2) If necessarily committed in retaking felons who have been rescued or who have escaped; or
(3) If necessarily committed in arresting felons fleeing from justice.