inference can be done using igraph