Networkx Verifique se o nó existe

G = nx.Graph()
     
if node_name in G:
	# do something
Difficult Dormouse