The legislation which deals with this defence is the Criminal Code Act 1913 at Section 25. It provides as follows:
(1) This section does not apply if section 32, 246, 247 or 248 applies.
(2) A person is not criminally responsible for an act done, or an omission made, in an emergency under subsection (3).
(3) A person does an act or makes an omission in an emergency if —
(a) the person believes —
(i) circumstances of sudden or extraordinary emergency exist; and
(ii) doing the act or making the omission is a necessary response to the emergency;
and
(b) the act or omission is a reasonable response to the emergency in the circumstances as the person believes them to be; and
(c) there are reasonable grounds for those beliefs.