def visualise(self, graph, pos): import pylab nx.draw_networkx_nodes(graph, pos) nx.draw(graph, pos, with_labels=True, node_size=2000, node_color='w') pylab.show()