Assessing structural similarity of graphs