Adds docstrings to internal function.