(a) A witness who appears before a magistrate and is sworn is subject to the penalties for perjury provided by law.
(b) A referring court may issue attachment against and may fine or imprison a witness whose failure to appear after being summoned or whose refusal to answer questions has been certified to the court.