Section 5. In any case where the attorney general has authority to institute an action or proceeding under section four, in lieu thereof he may accept an assurance of discontinuance of any method, act or practice in violation of this chapter from any person alleged to be engaged or to have been engaged in such method, act or practice. Such assurance may, among other terms, include a stipulation for the voluntary payment by such person of the costs of investigation, or of an amount to be held in escrow pending the outcome of an action or as restitution to aggrieved buyers, or both. Any such assurance of discontinuance shall be in writing and be filed with the superior court of Suffolk county. Matters thus closed may at any time be reopened by the attorney general for further proceedings in the public interest. Evidence of a violation of such assurance shall be prima facie evidence of a violation of section two in any subsequent proceeding brought by the attorney general.