for node in nodes:
if 'component_manager_id' not in node.attrib or \
node.attrib['component_manager_id'] != filter['component_manager_id']:
parent = node.getparent()
for node in nodes:
if 'component_manager_id' not in node.attrib or \
node.attrib['component_manager_id'] != filter['component_manager_id']:
parent = node.getparent()