move docstring helper functions into util.py