(4)Every person, who,—(a)interrupts any officer of a naval prison or naval detention quarters in the execution of his duty, or(b)aids or abets any person to assault, resist, or interrupt any such officer, shall for every such offence be punished with imprisonment which may extend to two years, or with fine, or both.