def METHOD_NAME(text_and_events):
    text, events = text_and_events
    text.insert("1.0", "abc")
    assert events.pop().data_class(Changes).change_list == [
        Change(start=[1, 0], old_end=[1, 0], new_end=[1, 3], old_text="", new_text="abc")
    ]
    text.window_create("1.0", window=tkinter.Button(text))
    text.insert("1.0 lineend", "xyz")
    # Notice that text index says 4 counting button, change event says 3 ignoring button
    assert text.search("xyz", "1.0") == "1.4"
    assert events.pop().data_class(Changes).change_list == [
        Change(start=[1, 3], old_end=[1, 3], new_end=[1, 6], old_text="", new_text="xyz")
    ]