A cavoodle puppy has helped fight off a venomous tiger snake who was attacking his friend.