How would you say "It takes one to know one" in Latin?

I must slightly amend my offering to

tantum talis talem cognoscere potest

which means the same thing literally, but in a ‘recognise/come to know’ sense of ‘know’, like the dif. between ‘je sais’ and ‘je connais’ in French.