In the enforcement of this chapter, the attorney general and/or any said prosecuting attorney may accept an assurance of compliance with the provisions of this chapter from any person deemed in violation hereof. Any such assurance shall be in writing and be filed with and subject to the approval of the superior court of the county in which the alleged violator resides or has his or her principal place of business, or in Thurston county.