i have a dictionary with nodes:
supernodes = list(nx.connected_components(G1))
the result of print(supernodes) is:
[{1, 2, 3, 5}, {8, 6}, {7, 9, 10, 12, 13}, {4}, {11}, {14}, {15}]
how can i merge each list to a node? I found this function nx.contracted_nodes(G, (1, 3)) but how can i put {1,2,3,5}, {8,6} etc and create the 7 contracted nodes?