Use Graph.iterators() for writing Graph instances in IO.