code: def get_multicond_prompt_list(prompts: SdConditioning | list[str]):
      res_indexes = []
  
      prompt_indexes = {}
      prompt_flat_list = SdConditioning(prompts)
      prompt_flat_list.clear()
  
      for prompt in prompts:
          subprompts = re_AND.split(prompt)
  
          indexes = []
          for subprompt in subprompts:
              match = re_weight.search(subprompt)
  
              text, weight = (
                  match.groups()
                  if match is not None
                  else (subprompt, 1.0)
              )
  
              weight = float(weight) if weight is not None else 1.0
  
              index = prompt_indexes.get(text, None)
              if index is None:
                  index = len(prompt_flat_list)
                  prompt_flat_list.append(text)
                  prompt_indexes[text] = index
  
              indexes.append((index, weight))
  
          res_indexes.append(indexes)
  
      return res_indexes, prompt_flat_list, prompt_indexes
  
imports: from __future__ import annotations
  import re
  from collections import namedtuple
  import lark
label_desc: Use image node_id 3 for calling a global function with example usage: get_multicond_prompt_list(prompts) and returns: res_indexes,  prompt_flat_list,  prompt_indexes