code: def get_infotext_names():
      from modules import generation_parameters_copypaste, shared
  
      res = {}
  
      for info in shared.opts.data_labels.values():
          if info.infotext:
              res[info.infotext] = 1
  
      for (
          tab_data
      ) in generation_parameters_copypaste.paste_fields.values():
          for _, name in tab_data.get("fields") or []:
              if isinstance(name, str):
                  res[name] = 1
  
      return list(res)
  
file_path: stable-diffusion-webui/modules/shared_items.py
imports: import sys
  from modules.shared_cmd_options import cmd_opts
label_desc: Use image node_id 12 for calling a global function with example usage: get_infotext_names() and returns: list