Sort nodes in reversed depth-first order. The nodes are sorted in such a way that parents
are always before children.
Args:
node_ids (Collection[str]): List of ids of nodes to sort.
edges (Collection[Edge]): List of edges.
Returns:
List[str]: List of sorted node ids.
This is used in create_visualization() to sort the L-nodes.
Edit: we also sort the I-nodes by the order of the anchoring L-nodes.
This implements
sort_nodes_by_hierarchy
:This is used in
create_visualization()
to sort the L-nodes.Edit: we also sort the I-nodes by the order of the anchoring L-nodes.