Document the requirement to close the iterator
Fix PEP8 errors