DOC: Add docstrings for added functions in util.py