def _test_fields(iterkv, test, efrag):
    try:
        for k, v in iterkv:
            if not test(v):
                raise ValueError()
    except __HOLE__:
        raise QSeqFormatError('Field %r is not %s.' % (k, efrag))
dataset/ETHPy150Open biocore/scikit-bio/skbio/io/format/qseq.py/_test_fields