I know this isn't a snake but I kept a common snapping turtle years ago from the egg. I handled this turtle way more often than I have any other. When he reached about 4 inches he started to push his face into my hand when I'd pick him up. The first time he did this I didn't see it, only felt it. I thought it was his foot. When I looked down I was sure he was going to bite me. Instead he simply relaxed and went limp. He did this almost everytime I picked him up. If someone else picked him up he'd push his face into their hand and then struggle to be set free.
I highly doubt he recognized me although I'd like to really think he did. I really believe he learned he was safe based on how I handled him versus how others reacted to his "face bumps". I don't think this was a sign of intelligence but rather conditioning.