def METHOD_NAME(self):
    # Save persistent setting to disk
    if not self.get("persistent", "enabled"):
        return
    if self.filename:
        with open(self.filename, "w") as file:
            file.write(json.dumps(self._settings, indent=2))