def METHOD_NAME(tmp_path):
    file_path = tmp_path / "out.txt"
    out = FileOutput(file_path)
    part = out.build_part(str(file_path), None)
    part.write_batch(["one1"])
    part.write_batch(["one2"])
    part.write_batch(["one3"])
    resume_state = part.snapshot()
    part.write_batch(["one4"])
    part.close()
    out = FileOutput(file_path)
    part = out.build_part(str(file_path), resume_state)
    assert part.snapshot() == resume_state
    part.write_batch(["two4"])
    part.write_batch(["two5"])
    part.close()
    with open(file_path, "rt") as f:
        found = f.readlines()
        expected = [
            "one1\n",
            "one2\n",
            "one3\n",
            "two4\n",
            "two5\n",
        ]
        assert found == expected