When the individual assessments have been completely paid and the purposes for which the assessment was levied have been accomplished and the funds remaining on hand from the assessment exceed the amount necessary to accomplish those purposes, then the commissioners may either retain such excess and use it for the general purposes of the district or they may petition the court for authority to rebate such excess or a portion thereof. When some of the individual assessments have been completely paid and others are unpaid or only partially paid, but the purposes for which the assessment was levied have been accomplished and the assessment exceeds the amount necessary to accomplish those purposes, then the commissioners may either retain such excess and use it for the general purposes of the district or they may petition the court for authority to rebate and abate such excess, or a portion thereof. Any such petition to rebate, or to rebate and abate, such excess, or a portion thereof, under this Section shall be verified by the commissioners and shall set forth (a) the amount of the assessment levied, (b) the amount collected, (c) the amount delinquent, if any, (d) the amount of the assessment which is not yet due and remains unpaid, if any, (e) the amount expended, (f) the amount of any indebtedness of the district which arose out of such assessment, (g) the amount of any other indebtedness of the district, (h) whether any funds are otherwise available for the payment of such indebtedness, (i) the amount which, in the opinion of the commissioners, should be rebated, or rebated and abated, and (j) the amount which should be retained for the general purposes of the district. Upon the petition being filed, it shall be presented to the court and the court shall set a time and place for hearing. The clerk of the court shall give notice of the hearing in substantially the form provided in Section 4--21, and in the manner and for the length of time provided in Section 4--22. Any person interested may appear at the hearing and show cause why the prayer of the petition should or should not be granted. If the court finds from the evidence that the remaining uncollected balance of the assessment, if any, and the funds on hand or otherwise available are in excess of the outstanding indebtedness, of the district and that no obligation of any contract will be impaired, the court may order the rebate, or the rebate and abatement, of that portion of the assessment not required for the general purposes of the district, provided that no assessment or installment against which there is a valid lien shall be abated without the consent of the holder or holders of such lien.
70 ILCS 605/5-28