code: def save_state_regularly(self, fname, frequency=600):
          
          self.save_state(fname)
          loop = asyncio.get_event_loop()
          self.save_state_loop = loop.call_later(frequency,
                                                 self.save_state_regularly,
                                                 fname,
                                                 frequency)
docs: Save the state of node with a given regularity to the given
          filename.
  
          Args:
              fname: File name to save retularly to
              frequency: Frequency in seconds that the state should be saved.
                          By default, 10 minutes.