All unpaid assessments upon public property shall be collected pursuant to this article, but if the property is not in use in the performance of a public function, the lien of the assessment may be foreclosed in the mode provided for foreclosure of assessments in Chapter 18 (commencing with Section 5410) of Part 3 of Division 7 (the Improvement Act of 1911).