Write the function undirectedAdjacency(pairs) that turns a list of undirected edges into an adjacency dictionary. Assume pairs is a list of 2-tuples of node names (strings); each pair (a, b) is one undirected edge, so it lets you go from a to b and from b to a, the way the Graph subclass adds each edge's reverse. Return a dictionary mapping every node name that appears in pairs to the set of names it is joined to. A repeated pair adds nothing new.
print(undirectedAdjacency([('a', 'b')])) # {'a': {'b'}, 'b': {'a'}} print(undirectedAdjacency([])) # {}