code: def _find_images(
      path, image_extensions=["jpg", "jpeg", "png", "gif"]
  ):
      """Find all unique image paths for a set of extensions."""
      image_files = set()
      for ext in image_extensions:
          this_ext_files = set(
              glob.glob(os.path.join(path, "*." + ext))
          )
          image_files = image_files.union(this_ext_files)
      return image_files
  
file_path: dipy/doc/sphinxext/docimage_scrap.py
imports: import os
  import glob
  import shutil
  import time
  from sphinx_gallery.scrapers import figure_rst
label_desc: Use image node_id 1 for calling a global function with example usage: _find_images(path, image_extensions) and returns: image_files