code: def save_lastnode_id():
      
      init_counter()
  
      with FileLock(_COUNTER_FILE):
          with AtomicFile(_COUNTER_FILE, mode="w") as fh:
              fh.write("%d\n" % _COUNTER)
docs: Save the id of the last node created.