Rebase + squash + fixup of #814.

why are these docstrings indented differently from the others?