No person shall practice law who holds a commission as judge in any court of record, or as sheriff or coroner; nor shall the clerk of the supreme court, the court of appeals, or of the superior court or any deputy thereof practice in the court of which he or she is clerk or deputy clerk: PROVIDED, It shall be unlawful for a deputy prosecuting attorney, or for the employee, partner, or agent of a prosecuting attorney, or for an attorney occupying offices with a prosecuting attorney, to appear for an adverse interest in any proceeding in which a prosecuting attorney is appearing, or to appear in any suit, action or proceeding in which a prosecuting attorney is prohibited by law from appearing, but nothing herein shall prohibit a prosecuting attorney or a deputy prosecuting attorney from appearing in any action or proceeding for an interest divergent from that represented in the same action or proceeding by another attorney or special attorney in or for the same office, so long as such appearances are pursuant to the duties of prosecuting attorneys as set out in RCW
36.27.020 and such appearances are consistent with the code of professional responsibility or other code of ethics adopted by the Washington state supreme court, but nothing herein shall preclude a judge or justice of a court of this state from finishing any business undertaken in a court of the United States prior to him or her becoming a judge or justice.