Bull snake

They evaluate whether animal is predator or prey by its size.

An excerpt from the article 17 facts about Bull snake
If animal is too big to consume they take defensive action, otherwise they are ready to attack.