code: def parse_prompt(prompt):
      res = defaultdict(list)
  
      def found(m):
          name = m.group(1)
          args = m.group(2)
  
          res[name].append(ExtraNetworkParams(items=args.split(":")))
  
          return ""
  
      prompt = re.sub(re_extra_net, found, prompt)
  
      return prompt, res
  
imports: import json
  import os
  import re
  import logging
  from collections import defaultdict
  from modules import errors
label_desc: Use image node_id 8 for calling a global function with example usage: parse_prompt(prompt) and returns: prompt,  res, str