If the district has any bonds which were issued under the provisions of this code but which cannot, in the opinion of the board, be sold on terms which are advantageous to the district, the district may obtain a loan in an amount of not more than the amount of the unsold bonds. The money may be used for any of the purposes for which the bonds were issued, and the bonds may be pledged as a guarantee or assurance that the loan will be paid. The amount of bonds pledged may not exceed the amount of the loan by more than 15 percent.