code: def find_vendored_libs(vendor_dir, whitelist, whitelist_dirs):
      vendored_libs = []
      paths = []
      for item in vendor_dir.iterdir():
          if item.is_dir() and item not in whitelist_dirs:
              vendored_libs.append(item.name)
          elif item.is_file() and item.name not in whitelist:
              vendored_libs.append(item.stem)  # without extension
          else:  # not a dir or a file not in the whitelist
              continue
          paths.append(item)
      return vendored_libs, paths
  
file_path: metaflow/metaflow/vendor.py
imports: import glob
  import shutil
  import subprocess
  import re
  from functools import partial
  from itertools import chain
  from pathlib import Path
label_desc: Use image node_id 4 for calling a global function with example usage: find_vendored_libs(vendor_dir, whitelist, whitelist_dirs) and returns: vendored_libs,  paths