Prior to imposing a fine or penalty for failure to maintain a vacant property that is subject to a notice of default, that is purchased at a foreclosure sale, or that is acquired through foreclosure under a mortgage or deed of trust, a governmental entity shall provide the owner of that property with a notice of the violation and an opportunity to correct that violation.
(b)
This section shall not
apply if the governmental entity determines that a specific condition of the property threatens public health or safety.