Section 27. Whoever gives, sells or delivers any alcoholic beverages, as defined in section one of chapter one hundred and thirty-eight, to any patient or inmate of any public institution, or to any patient or inmate under the control of any such institution, except under the direction of a physician authorized so to do, and whoever has in his possession within the precincts of any such institution any such beverages with intent to consume the same or to convey, give, sell or deliver the same to any patient or inmate thereof, except under direction as aforesaid, shall be punished by a fine of not more than fifty dollars or by imprisonment for not more than two months.