def METHOD_NAME(df):
    assert not df.has_selection()
    assert not df.selection_can_undo()
    assert not df.selection_can_redo()
    df.select_nothing()
    assert not df.has_selection()
    assert not df.selection_can_undo()
    assert not df.selection_can_redo()
    total = df["x"].sum()
    assert not df.has_selection()
    assert not df.selection_can_undo()
    assert not df.selection_can_redo()
    df.select("x > 5")
    assert df.has_selection()
    total_subset = df["x"].sum(selection=True)
    assert total_subset < total
    assert df.selection_can_undo()
    assert not df.selection_can_redo()
    df.select("x < 7", mode="and")
    total_subset2 = df["x"].sum(selection=True)
    assert total_subset2 < total_subset
    assert df.selection_can_undo()
    assert not df.selection_can_redo()
    df.selection_undo()
    total_subset_same = df["x"].sum(selection=True)
    total_subset == total_subset_same
    assert df.selection_can_undo()
    assert df.selection_can_redo()
    df.selection_redo()
    total_subset2_same = df["x"].sum(selection=True)
    total_subset2 ==  total_subset2_same
    assert df.selection_can_undo()
    assert not df.selection_can_redo()
    df.selection_undo()
    df.selection_undo()
    assert not df.has_selection()
    assert not df.selection_can_undo()
    assert df.selection_can_redo()
    df.selection_redo()
    assert df.has_selection()
    assert df.selection_can_undo()
    assert df.selection_can_redo()
    df.select("x < 7", mode="and")
    assert df.selection_can_undo()
    assert not df.selection_can_redo()
    df.select_nothing()
    assert not df.has_selection()
    assert df.selection_can_undo()
    assert not df.selection_can_redo()
    df.selection_undo()
    assert df.selection_can_undo()
    assert df.selection_can_redo()