Any attorney-at-law who is the law partner of any district attorney in this state, who defends a criminal case of any kind, character or description in any court in this state in which such district attorney is the prosecuting officer, shall be guilty of a misdemeanor and upon conviction shall be fined not less than $100 nor more than $500.