Made doctests in collector.py Python3 compatible