Traverses the belief state's structure breadth-first

def iter_breadth_first(self, root=None):
        """ Traverses the belief state's structure breadth-first """
        if root == None:
            root = self
        yield root
        last = root 
        for node in self.iter_breadth_first(root):
            if isinstance(node, DictCell):
                # recurse
                for subpart in node:
                    yield subpart
                    last = subpart
            if last == node:
                return