Any person who holds any office or employment under the state or any county, city, district or other political or governmental unit of the state and who has taken any oath described in Section 1023 is relieved of ineligibility to office or employment if he or she petitions any superior court for leave to renounce all promises or obligations assumed by him or her under that oath, and renounces all those promises or obligations before a judge of that court.
Any other person who has taken or hereafter takes any such oath may at any time be relieved of ineligibility by petitioning any superior court and renouncing all such promises or obligations in like manner.