def to_digraph(self):
        g = graph.OrderedDiGraph()
        for node in self.bfs_iter(include_self=True, right_to_left=True):
            g.add_node(node.item, attr_dict=node.metadata)
            if node is not self:
                g.add_edge(node.parent.item, node.item)
        return g
Converts this node + its children into a ordered directed graph.
dataset/ETHPy150Open openstack/taskflow/taskflow/types/tree.py/Node.to_digraph