code: def get_cpp_output(header=header, usedouble=False):
      """find and run a C pre-processor on aubio.h"""
      cpp_cmd = get_preprocessor()
  
      macros = [("AUBIO_UNSTABLE", 1)]
      if usedouble:
          macros += [("HAVE_AUBIO_DOUBLE", 1)]
  
      if not os.path.isfile(header):
          raise Exception("could not find include file " + header)
  
      includes = [os.path.dirname(header)]
      cpp_cmd += distutils.ccompiler.gen_preprocess_options(
          macros, includes
      )
      cpp_cmd += [header]
  
      print("Running command: {:s}".format(" ".join(cpp_cmd)))
      proc = subprocess.Popen(
          cpp_cmd,
          stderr=subprocess.PIPE,
          stdout=subprocess.PIPE,
          universal_newlines=True,
      )
      assert proc, "Proc was none"
      cpp_output = proc.stdout.read()
      err_output = proc.stderr.read()
      if err_output:
          print(
              "Warning: preprocessor produced errors or warnings:\n%s"
              % err_output
          )
      if not cpp_output:
          raise_msg = (
              "preprocessor output is empty! Running command "
              + '"%s" failed' % " ".join(cpp_cmd)
          )
          if err_output:
              raise_msg += ' with stderr: "%s"' % err_output
          else:
              raise_msg += " with no stdout or stderr"
          raise Exception(raise_msg)
      if not isinstance(cpp_output, list):
          cpp_output = [l.strip() for l in cpp_output.split("\n")]
  
      return cpp_output
  
file_path: aubio/python/lib/gen_external.py
imports: import distutils.ccompiler
  import sys
  import os
  import subprocess
  import glob
  from distutils.sysconfig import customize_compiler
  from gen_code import MappedObject
label_desc: Use image node_id 3 for calling a global function with example usage: get_cpp_output(header, usedouble) and returns: cpp_output