```
def cloneGraph(self, node):
seen = {}
return self.clone_graph_help(node, seen)
def clone_graph_help(self, node, seen):
if not node:
return
if node in seen:
return seen[node]
new_node = UndirectedGraphNode(node.label)
seen[node] = new_node
for n in node.neighbors:
new_node.neighbors.append(self.clone_graph_help(n, seen))
return new_node
```