Every person who shall falsely personate or represent any public officer, or who shall willfully intrude himself or herself into a public office to which he or she has not been duly elected or appointed, or who shall willfully exercise any of the functions or perform any of the duties of such officer, without having duly qualified therefor, as required by law, or who, having been an executive or administrative officer, shall willfully exercise any of the functions of his or her office after his or her right to do so has ceased, or wrongfully refuse to surrender the official seal or any books or papers appertaining to such office, upon the demand of his or her lawful successor, shall be guilty of a gross misdemeanor.