code: def generate_random_prompt_from_tags(self, tags):
      max_count = None
      res = []
      for tag, count in tags:
          if not max_count:
              max_count = count
  
          v = random.random() * max_count
          if count > v:
              res.append(tag)
  
      return ", ".join(sorted(res))
  
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 6 for calling the LoraUserMetadataEditor obj's underlying member method code with example usage: obj.generate_random_prompt_from_tags(tags) and returns: str