213. Whoever accepts, or agrees to accept, or attempts to obtain any gratification for himself or any other person, or any restitution of property to himself or any other person, in consideration of his concealing an offence, or of his screening any person from legal punishment for any offence, or of his not proceeding against any person for the purpose of bringing him to legal punishment shall, if the offence is punishable with death, be punished with imprisonment for a term which may extend to seven years, and shall also be liable to fine; and if the offence is punishable with imprisonment for life, or with imprisonment which may extend to ten years, shall be punished with imprisonment for a term which may extend to three years, and shall also be liable to fine; and if the offence is punishable with imprisonment not extending to ten years, shall be punished with imprisonment for a term which may extend to one-fourth part of the longest term of imprisonment provided for the offence or with fine or with both.