class_docstr: allows saving and restoring default values for gradio components
class_docstr_tok: ["allows","saving","and","restoring","default","values","for","gradio","components"]
code: def ui_apply(self, *values):
      num_changed = 0
  
      current_ui_settings = self.read_from_file()
  
      for path, _, new_value in self.iter_changes(
          current_ui_settings.copy(), values
      ):
          num_changed += 1
          current_ui_settings[path] = new_value
  
      if num_changed == 0:
          return "No changes."
  
      self.write_to_file(current_ui_settings)
  
      return f"Wrote {num_changed} changes."
  
file_path: stable-diffusion-webui/modules/ui_loadsave.py
imports: import json
  import os
  import gradio
  from modules import errors
  from modules.ui_components import ToolButton, InputAccordion
label_desc: Use image node_id 9 for calling the UiLoadsave obj's underlying member method code with example usage: obj.ui_apply() and returns: str, num_changed, str, str