Fix dep_graph.py list extension function