To fill out the info already given, it is very much like glycerine slick and water soluble. it is why a fresh shed is wet and it lubricates the removal. Snakes get hazy and milky during the shed cycle this is the fluid (I forgot the correct name at the moment...) when the layers separate the milky look clears and shed will be soon. Soaking before during and especially after this cycle will wash it away and the soon to be shed skin dries out shrinks and tears the result is tight stuck skin that comes off in bits. When a snake is soaking before a shed in water by its self it is not able to produce or keep this liquid under the skin because (usually) the air is too dry and it is drying out faster than it is produced. It is possible a illness will interfere with the production as well. As mentioned a snake soaking before a shed indicates a problem 90% of the time.
- - - Updated - - -
On a side thought... I *think* and this is a theory of mine that royals also release a pheromone in the liquid and perhaps that triggers a shed cycle in other snakes just a thought. Some snakes use a shed to attract a mate but all mine seem to shed in groups one will show signs and then a few days later more will too. Currently I have 6 in shed of 11 it seems to many to be random.