def get_batch(self):

        if not self.is_batch():

            return None

        ret_dict = {

            'idToName': {},
            'nameToId': {}
        }

        has_fault = False

        search_node = self.response_doc.getElementsByTagNameNS(
            "*", "BatchResponse"
        ).item(0)

        for child in search_node.childNodes:

            tag = child.tagName

            if ":" in tag:

                tag = tag.split(":")[1]

            if tag == 'Fault':

                has_fault = True
                continue

            request_id = child.getAttribute("requestId")

            ret_dict['idToName'][request_id] = tag

            if list(ret_dict['nameToId'].keys()) not in tag:

                ret_dict['nameToId'][tag] = []

            ret_dict['nameToId'][tag].append(request_id)

        ret_dict['hasFault'] = has_fault

        return ret_dict
dataset/ETHPy150Open Zimbra-Community/python-zimbra/pythonzimbra/response_xml.py/ResponseXml.get_batch/swapped operands of `not in`