Section 13B. (a) As used in this section, the following words shall have the following meanings unless the context clearly requires otherwise:—
''Investigator'', an individual or group of individuals lawfully authorized by a department or agency of the federal government or any political subdivision thereof or a department or agency of the commonwealth or any political subdivision thereof to conduct or engage in an investigation of, prosecution for, or defense of a violation of the laws of the United States or of the commonwealth in the course of such individual's or group's official duties.
''Harass'', to engage in an act directed at a specific person or group of persons that seriously alarms or annoys such person or group of persons and would cause a reasonable person or group of persons to suffer substantial emotional distress including, but not limited to, an act conducted by mail or by use of a telephonic or telecommunication device or electronic communication device including, but not limited to, a device that transfers signs, signals, writing, images, sounds, data or intelligence of any nature, transmitted in whole or in part by a wire, radio, electromagnetic, photoelectronic or photo-optical system including, but not limited to, electronic mail, internet communications, instant messages and facsimile communications.
(b) Whoever willfully, either directly or indirectly: (i) threatens, attempts or causes physical, emotional or economic injury or property damage to; (ii) conveys a gift, offer or promise of anything of value to; or (iii) misleads, intimidates or harasses another person who is a: (A) witness or potential witness; (B) person who is or was aware of information, records, documents or objects that relate to a violation of a criminal law or a violation of conditions of probation, parole, bail or other court order; (C) judge, juror, grand juror, attorney, victim witness advocate, police officer, correction officer, federal agent, investigator, clerk, court officer, court reporter, court interpreter, probation officer or parole officer; (D) person who is or was attending or a person who had made known an intention to attend a proceeding described in this section; or (E) family member of a person described in this section, with the intent to or with reckless disregard for the fact that it may; (1) impede, obstruct, delay, prevent or otherwise interfere with: a criminal investigation at any stage, a grand jury proceeding, a dangerousness hearing, a motion hearing, a trial or other criminal proceeding of any type or a parole hearing, parole violation proceeding or probation violation proceeding; or an administrative hearing or a probate or family court proceeding, juvenile proceeding, housing proceeding, land proceeding, clerk's hearing, court-ordered mediation or any other civil proceeding of any type; or (2) punish, harm or otherwise retaliate against any such person described in this section for such person or such person's family member's participation in any of the proceedings described in this section, shall be punished by imprisonment in the state prison for not more than 10 years or by imprisonment in the house of correction for not more than 21/2 years or by a fine of not less than $1,000 or more than $5,000 or by both such fine and imprisonment. If the proceeding in which the misconduct is directed at is the investigation or prosecution of a crime punishable by life imprisonment or the parole of a person convicted of a crime punishable by life imprisonment, such person shall be punished by imprisonment in the state prison for not more than 20 years or by imprisonment in the house of corrections for not more than 21/2 years or by a fine of not more than $10,000 or by both such fine and imprisonment.
(c) A prosecution under this section may be brought in the county in which the criminal investigation, trial or other proceeding was being conducted or took place or in the county in which the alleged conduct constituting the offense occurred.