def compare(reference, simulated, display_limit=-1):
    time = reference['time']
    steps = len(time)
    err = False
    displayed = 0
    for i in range(steps):
        for n, series in list(reference.items()):
            if n not in simulated:
                if n in IGNORABLE_COLS:
                    continue
                if display_limit >= 0 and displayed < display_limit:
                    log(ERROR, 'missing column %s in second file', n)
                    displayed += 1
                break
            if len(reference[n]) != len(simulated[n]):
                if display_limit >= 0 and displayed < display_limit:
                    log(ERROR, 'len mismatch for %s (%d vs %d)',
                        n, len(reference[n]), len(simulated[n]))
                    displayed += 1
                err = True
                break
            ref = float(series[i])
            sim = float(simulated[n][i])
            around_zero = isclose(ref, 0, abs_tol=1e-06) and isclose(sim, 0, abs_tol=1e-06)
            if not around_zero and not isclose(ref, sim, rel_tol=1e-4):
                if display_limit >= 0 and displayed < display_limit:
                    log(ERROR, 'time %s mismatch in %s (%s != %s)', time[i], n, ref, sim)
                    displayed += 1
                err = True
    return err
Done_reding does not mean that the iterator's buffer is empty.
dataset/ETHPy150Open JamesPHoughton/pysd/tests/test-models-master/compare.py/compare--crossover with--dataset/ETHPy150Open codeinn/vcs/vcs/subprocessio.py/BufferedGenerator.done_reading