@not_implemented_for('undirected')
def dag_longest_path_length(G):
    path_length = len(nx.dag_longest_path(G)) - 1
    return path_length
Returns the longest path length in a DAG
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/dag.py/dag_longest_path_length