Section 126A. Whoever falsely assumes, pretends to be or holds himself out as an officer or servant of a gas or electric company for the purpose of gaining access to any premises shall be punished by imprisonment in a house of correction for not more than two years or by a fine of not more than one thousand dollars, or both such fine and imprisonment.