python code for statistical analysis of graph-valued data