code: def extract_dep(url, filename):
      import tarfile
      import urllib.request
      import zipfile
  
      file = os.path.join(depends_dir, filename)
      if not os.path.exists(file):
          ex = None
          for i in range(3):
              try:
                  print("Fetching %s (attempt %d)..." % (url, i + 1))
                  content = urllib.request.urlopen(url).read()
                  with open(file, "wb") as f:
                      f.write(content)
                  break
              except urllib.error.URLError as e:
                  ex = e
          else:
              raise RuntimeError(ex)
  
      print("Extracting " + filename)
      if filename.endswith(".zip"):
          with zipfile.ZipFile(file) as zf:
              zf.extractall(sources_dir)
      elif filename.endswith(".tar.gz") or filename.endswith(".tgz"):
          with tarfile.open(file, "r:gz") as tgz:
              tgz.extractall(sources_dir)
      else:
          raise RuntimeError("Unknown archive type: " + filename)
  
imports: import os
  import shutil
  import struct
  import subprocess
  import sys
label_desc: Use image node_id 12 for calling a global function with example usage: extract_dep(url, filename) without return types