We can get the index number of a selected item in a treeview widget.
The index number is useful if you want to move the selected item to another index position.
# Get the selected item iid
selected_iid = treeview_test.selection()
# Get the index of the item based on the iid
item_index = treeview_test.index(selected_iid[0])