networkx check if node exists

JavaScript
G = nx.Graph()
     
if node_name in G:
	# do something
Source

Also in JavaScript: