`generators` don't have `next` in python 3. I think you can use:

```python
next(g.in_edges_iter(current_vertex))
```