Several months ago my male ball python decided to bruise the top of his head cruising around his rack. I believe the bruise was caused by pressing his head upward against the shelf above his head. It was probably the result of him being the lone male python in a rack below 3 female pythons... I moved him to the top bin and he quit rubbing. We occasionally get head rub-related injury questions here, so I thought this simple application of snake first aid might be informative.
Anyway, the bruise:
It is difficult to see but he managed to rupture some blood vessels below the surface, causing a small amount of blood to form under the bruise.
I treated the area by cleaning it daily with a chlorhexidine solution followed by treating it with pain reliever-free neosporin. After the first shed the area looked improved. With the second shed, a scab containing the blood came off as well. After about 2 months and a third shed, he started looking about like this:
If you can't tell, he's missing a couple scales that came off with the scab. It looks like they may be coming back but I'm not too worried about it (scaleless ball pythons being a thing and all).