code: def save(self, filename):
      assert not cmd_opts.freeze_settings, "saving settings is disabled"
  
      with open(filename, "w", encoding="utf8") as file:
          json.dump(self.data, file, indent=4, ensure_ascii=False)
  
imports: import json
  import sys
  from dataclasses import dataclass
  import gradio
  from modules import errors
  from modules.shared_cmd_options import cmd_opts
label_desc: Use image node_id 6 for calling the Options obj's underlying member method code with example usage: obj.save(filename) without return types