Whoever, having been summoned as a witness by the authority of the Legislature or any committee referred to in section 2 of this title, to give testimony or to produce books, documents, records, or papers upon any matter under inquiry or investigation before the Legislature or committee, willfully makes default or disobeys the subpoena, or, having appeared, refuses to be sworn, or to answer any question pertinent to the subject under inquiry or investigation, or to produce any of the books, documents, records, or papers, shall be guilty of contempt and shall be fined not more than $200 or imprisoned not more than 30 days, or both.