Snakes brains do basically mammal brain stem functions and little more. They don't recognize owners, friends, etc. You're either food, not food, a threat or not a threat. That's about as deep as they think. That day the snake decided my neighbor was food and he almost was.
My male Burmese python started at 18 inches and was 5 ft a year later. My wife was dangling a medium size rat in the snake's terrarium when it latched onto her hand between the thumb and index finger. I lifted the snake out of the terrarium and gently unhooked the teeth from my wife's hand. That was her line in the sand. We found a new home for "Monty" with a childless couple experienced in handling pythons.