Move that docs trick into a function.
PEP8/cosmetic while I'm here.