The episode, The Art of Sleights and Deception (Season 5 Episode 20), follows the quest to uncover the identity of the pseudonymous author of a magic book, The Art of Sleights and Deceptions. Actually, in more traditional Sherlock Holmes style, the story follows a murder related to these investigations, because we must have our dead bodies for good wholesome entertainment.
The story is, in fact, based on a true one. I magic, there is a book written by an unknown author, S.W. Erdnase's Ruse Artifice and Subterfuge; The Expert at the Card Table. Originally published in 1902 it contains some of the earliest descriptions of techniques for cheating with cards. More importantly, it contains descriptions of how to perform the necessary sleights (prior to that, the description of a bottom deal might simply be that it is possible to take the bottom card while apparently taking the top one without any indication of how the hands move to accomplish this.) The book sold very poorly initially, but later became the subject of great study by magicians and the book has remained continuously in print for one hundred fifteen years and has video version, annotated versions and even commemorative playing cards and t-shirts.
But the author never came forward and identified himself. The illustrator was located, some decades after the fact, but provided only scant details which didn't point to a clear candidate. There have been many proposed candidates, most of which start with the fact that S.W. Erdnase spelled backwards is E.S. Andrews. The most compelling candidate was identified by magic historian and book publisher Richard Hatch, an E.S. Andrews who was in the right place at the right time.
Of course, once it hit American television, things needed to be spiced up. So a wealthy source (probably intended to be a parody of David Copperfield) offered a million dollar prize for unmasking his identity. There are a few twists inside that I did not see coming, probably because I know so much about the real history. But there was, very clearly, someone who knew an awful lot about this story, although no specific person was referenced in the credits.
I always delight in seeing magicians portrayed in mainstream movies and film. They almost never get it right. They didn't this time. (For example, the apartment of the expert card magician contained no playing cards, but was full primarily of kids' show props and a medieval torture device.) I found out a long time ago, that the film industry isn't interested in realism, when a stereotype will do perfectly well. Unless you are in the educational or documentary film business, trying to correct an audience's incorrect perception of how something is rarely worth the time. It's quicker and easier to go with the flow and simply give them what they expect. (I'm sure most lawyers watching Law & Order or The Goodwife feel exactly the same way.)
I remember years ago, I received a casting call for a magician for a role on a television series. The call specifically called for a "real magician". Many of my friends had received the same notice and none of us could figure out what "real magician" meant. The modern audition process is based on ignoring quality, and simply going through enough quantity to hopefully find what you want. Thus casting personnel never really learn to articulate what it is they want. They're able to sit back and wait until they see it and say, "That's it." Actors also aren't generally called upon to have any particular skills, except being able to pretend to have whatever particular skill is required.
It turned out, what "real magician" meant was "owned big boxes" like the kind you would use to saw a woman into halves. They wanted the props for the set and the magician to serve as an extra standing in front of them. You have to learn not to take these things personally.