Is line 1165 legal python?  I would have spelled it `ldict.update(handles, labels)`?  `handles` and `labels` only need to be iterable, so should be six-compliant.