code: def get_path(filename, location='local', cache=True, show_progress=False):
      
  
      datasets_url = ('https://github.com/astropy/photutils-datasets/raw/'
                      'master/data/{0}'.format(filename))
  
      if location == 'local':
          path = get_pkg_data_filename('data/' + filename)
      elif location == 'remote':    # pragma: no cover
          try:
              url = 'https://data.astropy.org/photometry/{0}'.format(filename)
              path = download_file(url, cache=cache,
                                   show_progress=show_progress)
          except (URLError, HTTPError):   # timeout or not found
              path = download_file(datasets_url, cache=cache,
                                   show_progress=show_progress)
      elif location == 'photutils-datasets':    # pragma: no cover
              path = download_file(datasets_url, cache=cache,
                                   show_progress=show_progress)
      else:
          raise ValueError('Invalid location: {0}'.format(location))
  
      return path
docs: Get path (location on your disk) for a given file.
  
      Parameters
      ----------
      filename : str
          File name in the local or remote data folder.
      location : {'local', 'remote', 'photutils-datasets'}
          File location.  ``'local'`` means bundled with ``photutils``.
          ``'remote'`` means the astropy data server (or the
          photutils-datasets repo as a backup) or the Astropy cache on
          your machine. ``'photutils-datasets'`` means the
          photutils-datasets repo or the Astropy cache on your machine.
      cache : bool, optional
          Whether to cache the contents of remote URLs.  Default is
          `True`.
      show_progress : bool, optional
          Whether to display a progress bar during the download (default
          is `False`).
  
      Returns
      -------
      path : str
          Path (location on your disk) of the file.
  
      Examples
      --------
      >>> from astropy.io import fits
      >>> from photutils import datasets
      >>> hdulist = fits.open(datasets.get_path('fermi_counts.fits.gz'))