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 person as district attorney or other public prosecutor; with whom such person is directly or indirectly connected 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 misdemeanor; and in addition to the punishment prescribed therefor, he shall forfeit his license to practice.
R.L.1910, § 2267.