on being convicted before any magistrate, not being the magistrate so obstructed, prevented, disturbed, molested, threatened, or insulted, is liable on conviction on indictment to a fine of $5,000 or to imprisonment for 5 years or on summary conviction to a fine of $1,000 or to imprisonment for one year.