code: def save(self):
          
          logger.debug("Save the GUI state to `%s`.", self.path)
          _save_json(self.path, {k: v for k, v in self.items()
                                 if k not in ('config_dir', 'name')})
docs: Save the state to the JSON file in the config dir.