PEP 8
generalizing bam iterator to support arbitrary fetch functions