Whosoever wounds, strikes, or assaults, any person while in the execution of his or her duty concerning the preservation of a vessel in distress, or any vessel or effects, stranded, or cast on shore, or lying under water, with intent to obstruct him or her, or thereby in fact obstructing him or her in the execution of such duty, shall be liable to imprisonment for seven years.