(a) In any case where the violator and/or owner, agent or tenant fails to abate the nuisance within the time specified by the court, or where the violator and/or owner, agent or tenant cannot be served with notice, or where the nature of the nuisance is such, in the opinion of the judge, that it must be immediately abated, the judge may issue an order to the sheriff, fire chief or code enforcement official directing the nuisance to be abated. The sheriff, fire chief or code enforcement official, in such case, shall keep a record of the expenses and costs of abating the nuisance, and the costs shall be billed against the violator and/or owner, agent or tenant for collection as for county revenues. The total expense, including administrative costs, incurred by the county in abating public nuisances under this article shall constitute a lien upon the property upon which the nuisance was abated. (b) When a nuisance is of such magnitude or degree that county equipment and personnel cannot safely or completely abate it, the county may contract with a private contractor to abate the nuisance on the county's behalf. (c) County officers and employees, or any county contractor operating under subsection (b) of this section, shall have the right of entry upon real property and shall be immune from prosecution, civil or criminal, for trespass upon real property while in the discharge of their duties in removing or abating any public nuisance under this article.