code: def save_users(users, path=settings.LOGIN_FILE):
      
      with open(path, "w") as fh:
          for username, data in users.items():
              pass_line = username + ":" + ":".join([
                  data["pass_hash"],
                  data["uid"],
                  data["gid"],
                  data["full_name"],
                  data["home"],
                  data["shell"]
              ])
  
              fh.write(pass_line + "\n")
docs: Save dictionary with user data to passwd file (default
      :attr:`ftp.settings.LOGIN_FILE`).
  
      Args:
          users (dict): dictionary with user data. For details look at dict
                        returned from :func:`load_users`.
          path (str, default settings.LOGIN_FILE): path of the file, where the
               data will be stored (default :attr:`ftp.settings.LOGIN_FILE`).