docs: def pkg_resouces_get_default_cache():
      """
      Determine the default cache location
  
      This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
      Otherwise, on Windows, it returns a 'Python-Eggs' subdirectory of the
      'Application Data' directory.  On all other systems, it's '~/.python-eggs'.
      """
      # This function borrowed from setuptools/pkg_resources
      egg_cache = compat.getenv('PYTHON_EGG_CACHE')
      if egg_cache is not None:
          return egg_cache
  
      if os.name != 'nt':
          return os.path.expanduser('~/.python-eggs')
  
      app_data = 'Application Data'   # XXX this may be locale-specific!
      app_homes = [
          (('APPDATA',), None),       # best option, should be locale-safe
          (('USERPROFILE',), app_data),
          (('HOMEDRIVE', 'HOMEPATH'), app_data),
          (('HOMEPATH',), app_data),
          (('HOME',), None),
          (('WINDIR',), app_data),    # 95/98/ME
      ]
  
      for keys, subdir in app_homes:
          dirname = ''
          for key in keys:
              if key in os.environ:
                  dirname = os.path.join(dirname, compat.getenv(key))
              else:
                  break
          else:
              if subdir:
                  dirname = os.path.join(dirname, subdir)
              return os.path.join(dirname, 'Python-Eggs')
      else:
          raise RuntimeError(
              "Please set the PYTHON_EGG_CACHE enviroment variable"
          )