def extra_node_ids(a, b):
    """
    Return list of nodes in a which aren't in b by id attribute.

    :param etree.ElementTree a: ElementTree representing first SVG document.
    :param etree.ElementTree a: ElementTree representing second SVG document.
    """
    ids_a = set([ el.attrib['id'] for el in a.iter() ])
    ids_b = set([ el.attrib['id'] for el in b.iter() ])

    return ids_a - ids_b