Any elector who takes or removes, or attempts to take or remove, any ballot from the polling place before the close of the polls; or any person who interferes with any elector when inside the polling place or when marking the ballot, or unduly influences, or attempts to unduly influence, any elector in the preparation of his or her ballot; or any elector who remains longer than the time allowed by law in the booth or compartment after being notified his or her time has expired, shall be guilty, upon conviction, of a violation.