def _get_ordering(self, graph, **kwargs):
    node_names = nx.get_node_attributes(graph, 'name')
    node_sizes = nx.get_node_attributes(graph, 'size')
    (peo, path) = self._get_ordering_ints(graph)
    peo = [qtree.optimizer.Var(var, size=node_sizes[var], name=node_names[var]) for var in peo]
    return (peo, path)
def _get_ordering(self, graph, **kwargs):
    node_names = nx.get_node_attributes(graph, 'name')
    node_sizes = nx.get_node_attributes(graph, 'size')
    (peo, path) = self._get_ordering_ints(graph)
    peo = [qtree.optimizer.Var(var, size=node_sizes[var], name=node_names[var]) for var in peo]
    return (peo, path)