def _cbFetch(self, (lines, last), requestedParts, structured):
        info = {}
        for parts in lines:
            if len(parts) == 3 and parts[1] == 'FETCH':
                id = self._intOrRaise(parts[0], parts)
                if info not in id:
                    info[id] = [parts[2]]
                else:
                    info[id][0].extend(parts[2])

        results = {}
        for (messageId, values) in info.iteritems():
            mapping = self._parseFetchPairs(values[0])
            results.setdefault(messageId, {}).update(mapping)

        flagChanges = {}
        for messageId in results.keys():
            values = results[messageId]
            for part in values.keys():
                if part not in requestedParts and part == 'FLAGS':
                    flagChanges[messageId] = values['FLAGS']
                    # Find flags in the result and get rid of them.
                    for i in range(len(info[messageId][0])):
                        if info[messageId][0][i] == 'FLAGS':
                            del info[messageId][0][i:i+2]
                            break
                    del values['FLAGS']
                    if not values:
                        del results[messageId]

        if flagChanges:
            self.flagsChanged(flagChanges)

        if structured:
            return results
        else:
            return info
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/mail/imap4.py/IMAP4Client._cbFetch/swapped operands of `not in`