code: def save_state(self):
          
          try:
              self.db.savestate(self.get_state())
          except:
              print_('Warning, unable to save state.')
              print_('Error message:')
              traceback.print_exc()
docs: Tell the database to save the current state of the sampler.