'Delete `labels` from all messages in uidlist.
Note that this function does not check against dryrun settings,
so you need to ensure that it is never called in a dryrun mode.'

def deletemessageslabels(self, uidlist, labels):

    labels = (labels - self.ignorelabels)
    result = self._messagelabels_aux('-X-GM-LABELS', uidlist, labels)
    if result:
        for uid in uidlist:
            self.messagelist[uid]['labels'] = (self.messagelist[uid]['labels'] - labels)
