code: def __call__(self, block, block_vars, gallery_conf):
      # Find all image files in the current directory.
      path_example = os.path.dirname(block_vars["src_file"])
      image_files = _find_images(path_example)
      # Iterate through files, copy them to the SG output directory
      image_names = []
      image_path_iterator = block_vars["image_path_iterator"]
      for path_orig in image_files:
          # If we already know about this image and it hasn't been modified
          # since starting, then skip it
          mod_time = os.stat(path_orig).st_mtime
          already_embedded = (
              path_orig in self.embedded_images
              and mod_time <= self.embedded_images[path_orig]
          )
          existed_before_build = mod_time <= self.start_time
          if already_embedded or existed_before_build:
              continue
          # Else, we assume the image has just been modified and is displayed
          path_new = next(image_path_iterator)
          self.embedded_images[path_orig] = mod_time
          image_names.append(path_new)
          shutil.copyfile(path_orig, path_new)
  
      if len(image_names) == 0:
          return ""
      else:
          return figure_rst(image_names, gallery_conf["src_dir"])
  
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 2 for calling the ImageFileScraper obj's underlying member method code with example usage: obj.__call__(block, block_vars, gallery_conf) and returns: str, figure_rst