Looks to me like someone just put the snake up there for the shot. No reason for a snake to be up there. This isn't some scary snake movie. Doubtful it was there before the putt.
I don't know I've seen snakes in some crazy places. Maybe he saw a bird hanging out on top of the basket so he decided to climb up and wait for another one. Not saying that one wasn't staged but I could def. see a snake checking out a basket.