Section 34B. Any person who wantonly or recklessly violates the state building code or state fire code and thereby causes serious bodily injury or death to any person shall be punished by a fine of not more than $25,000 or by imprisonment in the state prison for not more than 5 years or in a house of correction for not more than 21/2 years, or both.

For purposes of this section, ”serious bodily injury” shall mean bodily injury that results in a permanent disfigurement, loss or impairment of a bodily function, limb or organ, or a substantial risk of death.