def METHOD_NAME(text_and_events):
    text, events = text_and_events
    with change_batch(text):
        end = "end - 1 char"
        text.insert(end, "hello ")
        text.insert(end, "there")
        text.delete(f"{end} - 5 chars", end)
        text.insert(end, "world")
    assert text.get("1.0", end) == "hello world"
    text.update()
    assert len(events) == 1  # would be multiple events without change_batch
    assert events.pop().data_class(Changes).change_list == [
        Change(start=[1, 0], old_end=[1, 0], new_end=[1, 6], old_text="", new_text="hello "),
        Change(start=[1, 6], old_end=[1, 6], new_end=[1, 11], old_text="", new_text="there"),
        Change(start=[1, 6], old_end=[1, 11], new_end=[1, 6], old_text="there", new_text=""),
        Change(start=[1, 6], old_end=[1, 6], new_end=[1, 11], old_text="", new_text="world"),
    ]