Did they ever really use large butterfly nets to capture lunatics?

The image is a constant one back in the 30s and 40s, with references in comics, (“Beat it, before I call the men in white coats with the butterfly nets”), movies (like the 3 Stooges) and books.

Was this a gag from the get-go or did they really employ some kind of net to restrain lunatics?

I don’t have the answer but between that and the loonies dressing up as Napoleon I always wondered the same thing.