Right now it will pick all snakes because none is specified. To pick one you need to pass through the snake UID through the function and use it.
You should add a parameter to the function. When you call it, the parameter is the snake's UID.
Inside the function you add a condition, pick snake by UID where the value is the parameter. This then refers to that snake that collided with the object.