Any person who shall fail to attend as a witness upon any committee appointed by either the house or senate of the state of Washington, or both, after having been duly subpoenaed as provided in this chapter, or who, being in attendance as a witness before such committee, shall refuse to answer any question or produce any paper or document or book which he or she is required to answer or to produce by such committee, shall be deemed guilty of a misdemeanor, and upon conviction thereof shall be fined in any sum not exceeding five hundred dollars, or by imprisonment in the county jail for a term not longer than six months, or by both such fine and imprisonment.