code: def create_editor(self):
      self.create_default_editor_elems()
  
      self.taginfo = gr.HighlightedText(label="Training dataset tags")
      self.edit_activation_text = gr.Text(
          label="Activation text",
          info="Will be added to prompt along with Lora",
      )
      self.slider_preferred_weight = gr.Slider(
          label="Preferred weight",
          info="Set to 0 to disable",
          minimum=0.0,
          maximum=2.0,
          step=0.01,
      )
  
      with gr.Row() as row_random_prompt:
          with gr.Column(scale=8):
              random_prompt = gr.Textbox(
                  label="Random prompt",
                  lines=4,
                  max_lines=4,
                  interactive=False,
              )
  
          with gr.Column(scale=1, min_width=120):
              generate_random_prompt = gr.Button(
                  "Generate", size="lg", scale=1
              )
  
      self.edit_notes = gr.TextArea(label="Notes", lines=4)
  
      generate_random_prompt.click(
          fn=self.generate_random_prompt,
          inputs=[self.edit_name_input],
          outputs=[random_prompt],
          show_progress=False,
      )
  
      def select_tag(activation_text, evt: gr.SelectData):
          tag = evt.value[0]
  
          words = re.split(re_comma, activation_text)
          if tag in words:
              words = [x for x in words if x != tag and x.strip()]
              return ", ".join(words)
  
          return (
              activation_text + ", " + tag if activation_text else tag
          )
  
      self.taginfo.select(
          fn=select_tag,
          inputs=[self.edit_activation_text],
          outputs=[self.edit_activation_text],
          show_progress=False,
      )
  
      self.create_default_buttons()
  
      viewed_components = [
          self.edit_name,
          self.edit_description,
          self.html_filedata,
          self.html_preview,
          self.edit_notes,
          self.select_sd_version,
          self.taginfo,
          self.edit_activation_text,
          self.slider_preferred_weight,
          row_random_prompt,
          random_prompt,
      ]
  
      self.button_edit.click(
          fn=self.put_values_into_components,
          inputs=[self.edit_name_input],
          outputs=viewed_components,
      ).then(
          fn=lambda: gr.update(visible=True),
          inputs=[],
          outputs=[self.box],
      )
  
      edited_components = [
          self.edit_description,
          self.select_sd_version,
          self.edit_activation_text,
          self.slider_preferred_weight,
          self.edit_notes,
      ]
  
      self.setup_save_handler(
          self.button_save,
          self.save_lora_user_metadata,
          edited_components,
      )
  
file_path: stable-diffusion-webui/extensions-builtin/Lora/ui_edit_user_metadata.py
imports: import datetime
  import html
  import random
  import gradio
  import re
  from modules import ui_extra_networks_user_metadata
label_desc: Use image node_id 8 for calling the LoraUserMetadataEditor obj's underlying member method code with example usage: obj.create_editor() and returns: unknown, str