code: def get_files_with_extensions(folder, extensions):
      
      out = []
      for root, dirs, files in os.walk(folder):
          for file in files:
              filename, file_extension = os.path.splitext(file)
              if file_extension.replace(".", "") in extensions:
                  out += [os.path.join(root, file)]
                  # break
  
      return out
docs: walk dir and return .* files as a list
      Note: directories are walked recursively