I\'m new to NetworkX in Python. I have a directed graph and I\'m using nx.all_simple_paths to filter out nodes that have no upstream edges / links. It works but it\'s very s