This part (other than the following provisions) does not apply if the conduct making up the offence was in accordance with an approved code of practice or a mandatory code of practice:
(a) section 9A (Keeping laying fowls for commercial egg production—appropriate accommodation);
(b) section 9B (Keeping pigs—appropriate accommodation);
(c) section 9C (Removing or trimming beak of fowl);
(d) section 14 (Use or possession of prohibited item);
(e) section 17 (1) or (2) (Violent animal activities);
(f) section 18 (1) or (2) (Rodeos and game parks);
(g) section 19A (Medical and
surgical procedures—veterinary practitioners).