Deep copy of a graph
Each node of an undirected, connected graph has a val and a list neighbors. Write copy_graph(node): given one node, return its counterpart in a deep copy of the whole graph, made of new nodes with the same values, where each copy's neighbors lists the copies of the original's neighbors, in the same order. Values can repeat and the graph can have cycles; no node is its own neighbor. Leave the original as it was. If node is None, return None.
The tests call the provided run_copy(values, adj): node i has value values[i] and neighbors adj[i] (indexes), and your function gets node 0. It checks your copy and returns it in the same form.
Examples
run_copy([1,2,3,4], [[1,3],[0,2],[1,3],[0,2]])→[[1,2,3,4],[[1,3],[0,2],[1,3],[0,2]]]run_copy([5], [[]])→[[5],[[]]]run_copy([], [])→[[],[]]