G = nx.Graph()
G.add_edges_from([('A', 'B'), ('A', 'C'), ('D', 'B'), ('E', 'C'), ('E', 'F'
    ), ('B', 'H'), ('B', 'G'), ('B', 'F'), ('C', 'G')])
Draw different color for nodes in networkx based on their node value