Section 44. Whoever, except in compliance with an order of a court of competent jurisdiction, gives, signs or issues any writing purporting to grant a divorce to persons who are husband and wife according to the laws of the commonwealth, or purporting to be a certificate that a divorce has been granted to such persons, shall be punished by a fine of not more than one thousand dollars, or by imprisonment for not more than three years, or both.