329. Whoever voluntarily causes grievous hurt for the purpose of extorting from the sufferer, or from any person interested in the sufferer, any property or valuable security, or of constraining the sufferer, or any person interested in such sufferer, to do anything which is illegal or which may facilitate the commission of an offence, shall be punished with imprisonment for a term which may extend to twenty years, and shall also be liable to fine or to whipping.