It takes a thief to catch a thief

Does anyone know the meaning of this phrase?

The notion is that thieves are the experts when it comes to thieving. They would know best how to catch other thieves.

The phrase, usually expressed as 'set a thief to catch a thief', is proverbial, i.e. no one knows who coined it; although it is English, from the mid-17th century.