The same joke the other way around appeared in the British prison sitcom 'Porridge' about 10 years later. 'Porridge' was remade in the US as 'On The Rocks' featuring Rick Hurst, so the joke may have been used there as well. I'm guessing that it's an old joke that both sets of writers incorporated into their scripts, rather than one copying the other.