(a) If a witness brought in any manner before a grand jury refuses to testify, the witness's refusal shall be communicated to the attorney representing the state or to the court.
(b) The court may compel a witness described by Subsection (a) to answer a proper question by imposing a fine not to exceed $500 and by committing the witness to jail until the witness is willing to testify.