Every attorney who, directly or indirectly, advises in relation to, or aids or promotes the defense of, any action or proceeding in any court, the prosecution of which is carried on, aided, or promoted by any state's attorney or other public prosecutor with whom such attorney is connected, directly or indirectly, as a partner, or who takes or receives, directly or indirectly, from or on behalf of any defendant therein, any valuable consideration, upon any understanding or agreement whatever, express or implied, having relation to the defense thereof, is guilty of a class A misdemeanor and in addition to the punishment prescribed therefor, that attorney forfeits that attorney's license to practice.
N.D.C.C. § 27-13-11