(a) A witness appearing before an associate judge 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 before an associate judge after being summoned or whose refusal to answer questions has been certified to the court.