ProgramSelection getSelectionToRestore() {
            if ( previousRestoreSelection == null || previousRestoreSelection.isEmpty() ) {
                throw new AssertException( "Tried to restore a selection with no " +
                    "previous selection saved" );
            }
            return previousRestoreSelection;
        }
A state class to keep track of past and current selections and to determine when we can
restore an old selection.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/select/RestoreSelectionPlugin.java