Such failure to attend as a witness before a court, justice of the peace, master in chancery, master or auditor appointed by a court, or the county commissioners, shall also be a contempt of the court, and may be punished, in case of such failure to attend as a witness in a criminal prosecution, by a fine of not more than two hundred dollars or by imprisonment for not more than one month or both, or, in case of any other such failure to attend as aforesaid, by a fine of not more than twenty dollars.
Mass. Gen. Laws ch. 233, § 5