I don't feel like writing documentation, so here are a couple things. Take a look at the code if you want to figure it out.
shaders.py
contains all the functions.
draw_lights()
is the function for drawing lights with shadows.
draw_raw_lights()
draws without shadows.
2020 edit: Please don't use this. It's old and garbage.