You mean the Hauptmann von Köpenick.
A real thing that happened in 1912, the last time Majesty's pardon was ever granted before a trial in Germany (the president today can still pardon people after a sentence).
Kaiser Wilhelm was so amused that he let this guy get away scot free.
But I suppose the same stunt would work in a midwest town in post 911 USA just as well. When I was there it seemed to me that the craze for uniforms (as one of the few things) a common trait of 1900s imperial Germany/Prussia and the modern United States.
Worked for me, though, even if I was wearing a foreign naval uniform, the effects were quite nice sometimes