Best wishes for your snake. In all honesty, it doesn't look good. If it can be treated, it's probably going to take an extended course of antibiotics and possibly even surgery.
In the future, if anything that looks like it should be inside the snake is on the outside of the snake for more than an hour or so, just assume it isn't going to fix itself and head straight to the vet. A good rule is to imagine it's happening to you: Are you thinking 'wait it out' or 'go to the ER'?