Section 22A. Bonds or notes issued by a city may be secured in whole or in part by insurance or by letters or lines of credit or other credit facilities upon a two-thirds vote of the city council with the approval of the mayor. Any such insurance, letter or line of credit or credit facility may provide for reimbursement to be made over such period of time, not to exceed two years beyond the maturity date of the bonds or notes so secured, as the treasurer, with the approval of the mayor, shall deem proper and may provide for reimbursement to be made, and any such notes or bonds may be issued, at such rate or rates of interest as the treasurer, with the approval of the mayor, shall deem proper, including rates variable from time to time as determined by such index, banker's loan rate or other method as may be specified in such agreement or such bond or note. Notwithstanding any contrary provision of law, bonds or notes secured as described in this section may, in the discretion of the treasurer, with the approval of the mayor, be subject to prepayment at the option of the holder thereof at such times and prices and under such circumstances as the treasurer and the mayor shall specify. For the purpose of securing bonds and notes a city, acting by its treasurer, upon a two-thirds vote of all the city council, with the approval of the mayor, may enter into a trust agreement between the city and a corporate trustee which shall be a bank or trust company doing business in the commonwealth. Any such trust agreement, and any remarketing or other agreements necessary or incidental to the issuance of such bonds or notes, shall be in such form as may be deemed proper by the treasurer of such city, with the approval of its mayor, and shall be executed by its treasurer and countersigned by its mayor. It shall be lawful for any bank or trust company doing business in the commonwealth to act as a depository or trustee under any such trust agreement and to furnish such indemnification and pledge such securities as may be required by any such city. Any trustee under a trust agreement established pursuant to this section may bring suit upon the bonds or notes and may, either at law or equity, by suit, action, mandamus or other proceedings for legal or equitable relief, enforce all rights under the laws of the commonwealth or granted hereunder or under such trust agreement, and may enforce and compel the performance of all duties required under such trust agreement to be performed by the city or by any officer thereof. In a city with a plan D or plan E form of government, the powers granted in this section to the mayor shall be exercised by the city manager. The provisions of this section shall not apply to towns. All expenses incurred in carrying out the provisions of this section may be treated by the city as a cost of issuance.