code: def _find_solutions(sln_dir):
      solutions = []
  
      if os.path.isfile(sln_dir + "/vivado_hls.app"):
          sln_file = "vivado_hls.app"
      elif os.path.isfile(sln_dir + "/hls.app"):
          sln_file = "hls.app"
      else:
          return solutions
  
      with open(sln_dir + "/" + sln_file) as f:
          # Get rid of namespaces (workaround to support two types of vivado_hls.app files)
          xmlstring = re.sub(' xmlns="[^"]+"', "", f.read(), count=1)
  
      root = ET.fromstring(xmlstring)
      for sln_tag in root.findall("solutions/solution"):
          sln_name = sln_tag.get("name")
          if sln_name is not None and os.path.isdir(
              sln_dir + "/" + sln_name
          ):
              solutions.append(sln_name)
  
      return solutions
  
imports: import os
  import re
  import sys
  import xml.etree.ElementTree
label_desc: Use image node_id 3 for calling a global function with example usage: _find_solutions(sln_dir) and returns: solutions, solutions