Docstrings and formatting changes in agreement.py.