code: def cached_path(self, path_or_url):
          
          assert path_or_url, "Expected non-empty string for path_or_url"
          remote_filename = split(path_or_url)[1]
          if self.is_url_format(path_or_url):
              # passing `decompress=False` since there is logic below
              # for stripping decompression extensions for both local
              # and remote files
              local_filename = datacache.build_local_filename(
                  download_url=path_or_url,
                  filename=remote_filename,
                  decompress=False)
          else:
              local_filename = remote_filename
  
          # if we expect the download function to decompress this file then
          # we should use its name without the compression extension
          if self.decompress_on_download:
              local_filename = self._remove_compression_suffix_if_present(
                  local_filename)
  
          if len(local_filename) == 0:
              raise ValueError("Can't determine local filename for %s" % (
                  path_or_url,))
  
          return join(self.cache_directory_path, local_filename)
docs: When downloading remote files, the default behavior is to name local
          files the same as their remote counterparts.