The proceeds of refunding bonds may be applied to the purchase, retirement at maturity, or redemption of the bonds to be refunded either at their earliest redemption date or dates, any subsequent redemption date or dates, upon their purchase or retirement maturity, or paid to a third person to assume the local agency’s obligation to make the payments, and may, pending that application, be placed in escrow and invested or reinvested in any obligations or securities, and any interest or other increment earned or realized on any such investment may be applied to the payment of the bonds to be refunded or to the payment of interest on the refunding bonds, as provided in the proceedings of the local agency authorizing the issuance of the refunding bonds.