convert.py correctly converts to input for networkx