def _compare_large_strings(text1, text2):
    # Compare in sections of 8 lines, with an overlap of 4,
    # to make fails easier to read. Invariant to newline-types in Str nodes.
    lines1, lines2 = text1.splitlines(), text2.splitlines()
    for i in range(0, max(len(lines1), len(lines2)), 4):
        prefix = '# line %i\n' % i
        sec1 = prefix + '\n'.join(lines1[i:i+8])
        sec2 = prefix + '\n'.join(lines2[i:i+8]).replace('\\r\\n', '\\n')  # for pypy
        assert sec1 == sec2
dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_commonast.py/_compare_large_strings/original