convert the output adjacency matrix of random_partial into a graph via networkx