code: def walk(self, head=None):
          
          head = head or self._root_node
  
          queue = []
          queue.insert(0, head)
  
          while queue:
              node = queue.pop()
  
              yield node.num, node.previous, node.siblings
  
              for child in node.siblings:
                  if child in self._graph:
                      queue.insert(0, self._graph[child])
docs: Do a breadth-first walk of the graph, yielding on each node,
          starting at `head`.