misc/collect.py: add python version check