code: def add_external_deps(ext, usedouble=False):
      # loof for additional packages
      print("Info: looking for *optional* additional packages")
      packages = [
          "libavcodec",
          "libavformat",
          "libavutil",
          "libswresample",
          "jack",
          "sndfile",
          "rubberband",
          #'fftw3f',
      ]
      # samplerate only works with float
      if usedouble is False:
          packages += ["samplerate"]
      else:
          print(
              "Info: not adding libsamplerate in double precision mode"
          )
      add_packages(packages, ext=ext)
      if (
          "avcodec" in ext.libraries
          and "avformat" in ext.libraries
          and "avutil" in ext.libraries
          and "swresample" in ext.libraries
      ):
          ext.define_macros += [("HAVE_LIBAV", 1)]
      if "sndfile" in ext.libraries:
          ext.define_macros += [("HAVE_SNDFILE", 1)]
      if "samplerate" in ext.libraries:
          ext.define_macros += [("HAVE_SAMPLERATE", 1)]
      if "rubberband" in ext.libraries:
          ext.define_macros += [("HAVE_RUBBERBAND", 1)]
      if "fftw3f" in ext.libraries:
          ext.define_macros += [("HAVE_FFTW3F", 1)]
          ext.define_macros += [("HAVE_FFTW3", 1)]
  
      # add accelerate on darwin
      if sys.platform.startswith("darwin"):
          ext.extra_link_args += ["-framework", "Accelerate"]
          ext.define_macros += [("HAVE_ACCELERATE", 1)]
          ext.define_macros += [("HAVE_SOURCE_APPLE_AUDIO", 1)]
          ext.define_macros += [("HAVE_SINK_APPLE_AUDIO", 1)]
  
      if sys.platform.startswith("win"):
          ext.define_macros += [("HAVE_WIN_HACKS", 1)]
  
      ext.define_macros += [("HAVE_WAVWRITE", 1)]
      ext.define_macros += [("HAVE_WAVREAD", 1)]
  
      # TODO: add cblas
      if 0:
          ext.libraries += ["cblas"]
          ext.define_macros += [("HAVE_ATLAS_CBLAS_H", 1)]
  
imports: import sys, os, glob, subprocess
  import distutils, distutils.command.clean, distutils.dir_util
  from gen_external import generate_external, header, output_path
  from this_version import get_aubio_version
  from distutils.command.build_ext import build_ext
label_desc: Use image node_id 6 for calling a global function with example usage: add_external_deps(ext, usedouble) without return types