def audit(self, auditor: 'Auditor') -> None:
    ' Removes empty groups and invalid handles from all groups. '
    trash = []
    for (name, group) in self:
        group.audit(auditor)
        if (not len(group)):
            trash.append(name)
    for name in trash:
        auditor.fixed_error(code=AuditError.REMOVE_EMPTY_GROUP, message=f'Removed empty group "{name}".')
        self.delete(name)
Removes empty groups and invalid handles from all groups.
def audit(self, auditor: 'Auditor') -> None:
    '  '
    trash = []
    for (name, group) in self:
        group.audit(auditor)
        if (not len(group)):
            trash.append(name)
    for name in trash:
        auditor.fixed_error(code=AuditError.REMOVE_EMPTY_GROUP, message=f'Removed empty group "{name}".')
        self.delete(name)