(1) Unless inconsistent with other provisions of sections 18-1-703 to 18-1-707, defining justifiable use of physical force, or with some other provision of law, conduct which would otherwise constitute an offense is justifiable and not criminal when it is necessary as an emergency measure to avoid an imminent public or private injury which is about to occur by reason of a situation occasioned or developed through no conduct of the actor, and which is of sufficient gravity that, according to ordinary standards of intelligence and morality, the desirability and urgency of avoiding the injury clearly outweigh the desirability of avoiding the injury sought to be prevented by the statute defining the offense in issue.
(2) The necessity and justifiability of conduct under subsection (1) of this section shall not rest upon considerations pertaining only to the morality and advisability of the statute, either in its general application or with respect to its application to a particular class of cases arising thereunder. When evidence relating to the defense of justification under this section is offered by the defendant, before it is submitted for the consideration of the jury, the court shall first rule as a matter of law whether the claimed facts and circumstances would, if established, constitute a justification.