If any person shall, by threats, menaces, or otherwise, intimidate, or attempt to intimidate, a witness for the state in any prosecution under the provisions of sections seven and eight of this article, for the purpose of preventing the attendance of such witness at the trial of such case, or shall in any way or manner prevent, or attempt to prevent, the attendance of any such witness at such trial, he shall be guilty of a felony, and, upon conviction, shall be confined in the penitentiary not less than one nor more than ten years, or he may, in the discretion of the court, be confined in jail not less than three nor more than twelve months, and fined not less than $100 nor more than $5,000.