No person shall, knowing the commission of an offense, punishable under any of the provisions of the Codified Ordinances or other ordinances of this Town, take any money or reward, or any engagement therefor, upon an agreement or undertaking expressed or implied to compound or conceal such offense or not to prosecute therefor, or not to give evidence thereof.