code: def get_sources(source_dir, exclude_globs=[]):
      sources = []
      for directory, subdirs, basenames in os.walk(source_dir):
          for path in [
              os.path.join(directory, basename)
              for basename in basenames
          ]:
              # filter out non-source files
              if os.path.splitext(path)[1] not in _source_extensions:
                  continue
  
              path = os.path.abspath(path)
  
              # filter out files that match the globs in the globs file
              if any([fnmatch(path, glob) for glob in exclude_globs]):
                  continue
  
              sources.append(path)
      return sources
  
file_path: arrow/cpp/build-support/lintutils.py
imports: import multiprocessing
  import os
  from fnmatch import fnmatch
  from subprocess import Popen
label_desc: Use image node_id 4 for calling a global function with example usage: get_sources(source_dir, exclude_globs) and returns: sources