Pair provided to DAG not in graph raises NetworkXError.