def METHOD_NAME(root):
    for material in root.iter(tag='material'):
        material_name = material.get('name')
        yield material_name, {node.get('name'): node for node in material.iter(tag='node')}