code: def _save(self, stateName, path):
          
          print('saving...')
  
          state = {'session': dict(self.opts),
                   'dialogs': self.dialogs.saveState()}
  
          self.sigSave.emit(state)
          self.saveThread.prepare(stateName, path, self.tmp_dir_session, state)
          self.saveThread.start()
  
          self.current_session = stateName
  
          r = self.opts['recent sessions']
          try:
              # is this session already exists: remove it
              r.pop(r.index(path))
          except ValueError:
              pass
          # add this session at the beginning
          r.insert(0, path)
docs: save into 'stateName' to pyz-path