Funds made available under this chapter and the Arms Export Control Act [
22 U.S.C.
2751 et seq.], may remain available for obligation for a period not to exceed 8 months from the date of any termination of assistance under such chapter or Act for the necessary expenses of winding up programs related to such termination and may remain available until expended. Funds obligated under the authority of such chapter or Act prior to the effective date of the termination of assistance may remain available for expenditure for the necessary expenses of winding up programs related to such termination notwithstanding any provision of law restricting the expenditure of funds. In order to ensure the effectiveness of such assistance, such expenses for orderly termination of programs may include the obligation and expenditure of funds to complete the training or studies outside their countries of origin of students whose course of study or training program began before assistance was terminated.