def METHOD_NAME(text_and_events):
    text, events = text_and_events
    text.insert("end", "foobar")
    text.update()
    events.pop()
    # tkinter doesn't support weirder ways to delete
    text.tk.call(text, "delete", "1.3", "1.5", "1.4", "1.6", "1.0")
    text.update()
    assert text.get("1.0", "end - 1 char") == "oo"
    assert events.pop().data_class(Changes).change_list == [
        Change(start=[1, 3], old_end=[1, 6], new_end=[1, 3], old_text="bar", new_text=""),
        Change(start=[1, 0], old_end=[1, 1], new_end=[1, 0], old_text="f", new_text=""),
    ]
    for args in [("1.4", "1.6", "1.4", "1.5"), ("1.4", "1.5", "1.4", "1.6")]:
        text.delete("1.0", "end")
        text.insert("1.0", "hello world")
        text.update()
        events.clear()
        text.tk.call(text, "delete", *args)
        text.update()
        assert text.get("1.0", "end - 1 char") == "hellworld"
        assert events.pop().data_class(Changes).change_list == [
            Change(start=[1, 4], old_end=[1, 6], new_end=[1, 4], old_text="o ", new_text="")
        ]