def restore_session_values(func):
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        original_folder          = self._active_folder
        original_recursive_query = self._recursive_query

        func_ret = func(self, *args, **kwargs)

        if self._active_folder != original_folder:
            self.active_folder = original_folder

        if self._recursive_query != original_recursive_query:
            self.recursive_query = original_recursive_query

        return func_ret

    return wrapper


# Enable recursive reading
dataset/ETHPy150Open tdevelioglu/python-f5/f5/lb.py/restore_session_values/original