Python: Add docstrings and comments