code: def get_remote_file(
      fname, directory=None, force_download=False, auto=True
  ):
      """Get a the filename for the local version of a file from the web
  
      Parameters
      ----------
      fname : str
          The relative filename on the remote data repository to download.
          These correspond to paths on
          ``https://github.com/imageio/imageio-binaries/``.
      directory : str | None
          The directory where the file will be cached if a download was
          required to obtain the file. By default, the appdata directory
          is used. This is also the first directory that is checked for
          a local version of the file. If the directory does not exist,
          it will be created.
      force_download : bool | str
          If True, the file will be downloaded even if a local copy exists
          (and this copy will be overwritten). Can also be a YYYY-MM-DD date
          to ensure a file is up-to-date (modified date of a file on disk,
          if present, is checked).
      auto : bool
          Whether to auto-download the file if its not present locally. Default
          True. If False and a download is needed, raises NeedDownloadError.
  
      Returns
      -------
      fname : str
          The path to the file on the local system.
      """
      _url_root = (
          "https://github.com/imageio/imageio-binaries/raw/master/"
      )
      url = _url_root + fname
      nfname = op.normcase(fname)  # convert to native
      # Get dirs to look for the resource
      given_directory = directory
      directory = given_directory or appdata_dir("imageio")
      dirs = resource_dirs()
      dirs.insert(0, directory)  # Given dir has preference
      # Try to find the resource locally
      for dir in dirs:
          filename = op.join(dir, nfname)
          if op.isfile(filename):
              if not force_download:  # we're done
                  if given_directory and given_directory != dir:
                      filename2 = os.path.join(given_directory, nfname)
                      # Make sure the output directory exists
                      if not op.isdir(op.dirname(filename2)):
                          os.makedirs(op.abspath(op.dirname(filename2)))
                      shutil.copy(filename, filename2)
                      return filename2
                  return filename
              if isinstance(force_download, str):
                  ntime = time.strptime(force_download, "%Y-%m-%d")
                  ftime = time.gmtime(op.getctime(filename))
                  if ftime >= ntime:
                      if given_directory and given_directory != dir:
                          filename2 = os.path.join(
                              given_directory, nfname
                          )
                          # Make sure the output directory exists
                          if not op.isdir(op.dirname(filename2)):
                              os.makedirs(
                                  op.abspath(op.dirname(filename2))
                              )
                          shutil.copy(filename, filename2)
                          return filename2
                      return filename
                  else:
                      print(
                          "File older than %s, updating..."
                          % force_download
                      )
                      break
  
      # If we get here, we're going to try to download the file
      if os.getenv("IMAGEIO_NO_INTERNET", "").lower() in (
          "1",
          "true",
          "yes",
      ):
          raise InternetNotAllowedError(
              "Will not download resource from the "
              "internet because environment variable "
              "IMAGEIO_NO_INTERNET is set."
          )
  
      # Can we proceed with auto-download?
      if not auto:
          raise NeedDownloadError()
  
      # Get filename to store to and make sure the dir exists
      filename = op.join(directory, nfname)
      if not op.isdir(op.dirname(filename)):
          os.makedirs(op.abspath(op.dirname(filename)))
      # let's go get the file
      if os.getenv("CONTINUOUS_INTEGRATION", False):  # pragma: no cover
          # On CI, we retry a few times ...
          for i in range(2):
              try:
                  _fetch_file(url, filename)
                  return filename
              except IOError:
                  time.sleep(0.5)
          else:
              _fetch_file(url, filename)
              return filename
      else:  # pragma: no cover
          _fetch_file(url, filename)
          return filename
  
file_path: imageio/imageio/core/fetching.py
imports: from math import log
  import os
  from os import path
  import sys
  import shutil
  import time
  from .None import appdata_dir, resource_dirs
  from .None import StdoutProgressIndicator, urlopen
label_desc: Use image node_id 1 for calling a global function with example usage: get_remote_file(fname, directory, force_download, auto) and returns: filename, filename, filename, filename, filename2, filename, filename2