move yield_chunks to common.py