(iv) a person who is furthering a civil or criminal proceeding, including criminal investigation, grand jury proceeding, trial, other criminal proceeding of any type, probate and family proceeding, juvenile proceeding, housing proceeding, land proceeding, clerk’s hearing, court ordered mediation, any other civil proceeding of any type; or

(v) a person who is or was attending or had made known his intention to attend a civil or criminal proceeding, including criminal investigation, grand jury proceeding, trial, other criminal proceeding of any type, probate and family proceeding, juvenile proceeding, housing proceeding, land proceeding, clerk’s hearing, court-ordered mediation, any other civil proceeding of any type with the intent to impede, obstruct, delay, harm, punish or otherwise interfere thereby, or do so with reckless disregard, with such a proceeding shall be punished by imprisonment in a jail or house of correction for not more than 2 and one-half years or by imprisonment in a state prison for not more than 10 years, or by a fine of not less than $1,000 nor more than $5,000, or by both such fine and imprisonment.

(2) As used in this section, “investigator” shall mean 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 his official duties.

(3) As used in this section, “harass” shall mean to engage in any act directed at a specific person or persons, which act seriously alarms or annoys such person or persons and would cause a reasonable person to suffer substantial emotional distress. Such act shall include, but not be 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 any 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, photo-electronic or photo-optical system, including, but not limited to, electronic mail, internet communications, instant messages or facsimile communications.

(4) A prosecution under this section may be brought in the county in which the criminal investigation, grand jury proceeding, trial or other criminal proceeding is being conducted or took place, or in the county in which the alleged conduct constituting an offense occurred.