test function for closeness-centrality of graphs.