Networkx Sprawdź, czy istnieje węzeł
G = nx.Graph()
if node_name in G:
# do something
Difficult Dormouse
G = nx.Graph()
if node_name in G:
# do something