code: def download(directory=None, force_download=False):
      """Download the FreeImage library to your computer.
  
      Parameters
      ----------
      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.
      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).
      """
      plat = get_platform()
      if plat and plat in FNAME_PER_PLATFORM:
          fname = "freeimage/" + FNAME_PER_PLATFORM[plat]
          get_remote_file(
              fname=fname,
              directory=directory,
              force_download=force_download,
          )
          fi._lib = None
  
imports: import os
  import sys
  import ctypes
  import threading
  import logging
  import numpy
  from ..core import get_remote_file, load_lib, Dict, resource_dirs, IS_PYPY, get_platform, InternetNotAllowedError, NeedDownloadError
label_desc: Use image node_id 1 for calling a global function with example usage: download(directory, force_download) without return types