code: def _create_image_fetcher():
      try:
          import pooch
  
          # older versions of Pooch don't have a __version__ attribute
          if not hasattr(pooch, "__version__"):
              retry = {}
          else:
              retry = {"retry_if_failed": 3}
      except ImportError:
          # Without pooch, fallback on the standard data directory
          # which for now, includes a few limited data samples
          return None, _LEGACY_DATA_DIR
  
      # Pooch expects a `+` to exist in development versions.
      # Since scikit-image doesn't follow that convention, we have to manually
      # remove `.dev` with a `+` if it exists.
      # This helps pooch understand that it should look in master
      # to find the required files
      if "+git" in __version__:
          skimage_version_for_pooch = __version__.replace(
              ".dev0+git", "+git"
          )
      else:
          skimage_version_for_pooch = __version__.replace(".dev", "+")
  
      if "+" in skimage_version_for_pooch:
          url = (
              "https://github.com/scikit-image/scikit-image/raw/"
              "{version}/skimage/"
          )
      else:
          url = (
              "https://github.com/scikit-image/scikit-image/raw/"
              "v{version}/skimage/"
          )
  
      # Create a new friend to manage your sample data storage
      image_fetcher = pooch.create(
          # Pooch uses appdirs to select an appropriate directory for the cache
          # on each platform.
          # https://github.com/ActiveState/appdirs
          # On linux this converges to
          # '$HOME/.cache/scikit-image'
          # With a version qualifier
          path=pooch.os_cache("scikit-image"),
          base_url=url,
          version=skimage_version_for_pooch,
          version_dev="main",
          env="SKIMAGE_DATADIR",
          registry=registry,
          urls=registry_urls,
          # Note: this should read `retry_if_failed=3,`, but we generate that
          # dynamically at import time above, in case installed pooch is a less
          # recent version
          **retry,
      )
  
      data_dir = osp.join(str(image_fetcher.abspath), "data")
      return image_fetcher, data_dir
  
imports: import numpy
  import shutil
  from ..util.dtype import img_as_bool
  from ._registry import registry, registry_urls
  from ..None import __version__
  import os.path
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: _create_image_fetcher() and returns: image_fetcher,  data_dir, None,  _LEGACY_DATA_DIR