A person who endeavours to resist or prevent the execution of the law—
(a) by escaping from lawful custody for crime;
(b) by aiding or permitting any other person to escape from lawful custody for a crime;
(c) by permitting himself or herself to be rescued from lawful custody for a crime;
(d) by rescuing any other person from lawful custody for crime,
is liable on conviction on indictment if such crime is punishable with death or with imprisonment for more than 7 years, to imprisonment for 15 years or if such crime is punishable with imprisonment for not more than 7 years, to imprisonment for 10 years, or, if such crime is a summary offence to imprisonment for 7 years or to a fine of $2,000 on summary conviction.