Thats called probing, basically they probe for the sex and pop the genitals out. if you look underneath at where the body tapers off to the tail, you will see a kind of slit, thats where all thier organs are and where they probe. generally though male and female tails taper off different to each other. the male tends taper off long and slender and the females are more abrupt and shorter. if you look at the pic you posted you can see the quite abrubt taper on snakey, thats why im guessing she is a female. its not always 100% in young snakes, but gets more distinct as they get older.