@property
    def xml(self):
        xml = self._snapshot.getXMLDesc(0)
        snapshot_xmltree = ET.fromstring(xml)

        # Get cpu model from domain definition as it is not available
        # in snapshot XML for host-passthrough cpu mode
        cpu = snapshot_xmltree.findall('./domain/cpu')
        if cpu and cpu[0].attrib in 'mode':
            cpu_mode = cpu[0].get('mode')
            if cpu_mode == 'host-passthrough':
                domain = self._snapshot.getDomain()
                domain_xml = domain.XMLDesc(
                    libvirt.VIR_DOMAIN_XML_UPDATE_CPU)
                domain_xmltree = ET.fromstring(domain_xml)
                cpu_element = domain_xmltree.find('./cpu')
                domain_element = snapshot_xmltree.findall('./domain')[0]
                domain_element.remove(domain_element.findall('./cpu')[0])
                domain_element.append(cpu_element)

        return ET.tostring(snapshot_xmltree)
dataset/ETHPy150Open openstack/fuel-devops/devops/driver/libvirt/libvirt_driver.py/Snapshot.xml/swapped operands of `in`