class_docstr: Resolves HTTP handles by downloading and decompressing them to local fs.
class_docstr_tok: ["Resolves","HTTP","handles","by","downloading","and","decompressing","them","to","local","fs","."]
code: def __call__(self, handle):
      module_dir = _module_dir(handle)
  
      def download(handle, tmp_dir):
          """Fetch a module via HTTP(S), handling redirect and download headers."""
          # Directly load the model from GCS.
          if handle.startswith(_HUB_TF_GOOGLE_CN):
              full_model_name = handle[len(_HUB_TF_GOOGLE_CN) :]
              gcs_cn_url = _GCS_GOOGLE_CN_TEMPLATE % full_model_name
              logging.info("Directly downloading %s", gcs_cn_url)
              response = self._call_urlopen(gcs_cn_url)
              return resolver.DownloadManager(
                  handle
              ).download_and_uncompress(response, tmp_dir)
  
          request = urllib.request.Request(
              self._append_compressed_format_query(handle)
          )
          response = self._call_urlopen(request)
          return resolver.DownloadManager(
              handle
          ).download_and_uncompress(response, tmp_dir)
  
      return resolver.atomic_download(
          handle, download, module_dir, self._lock_file_timeout_sec()
      )
  
file_path: hub/tensorflow_hub/compressed_module_resolver.py
imports: import hashlib
  import logging
  import urllib
  import tensorflow
  from tensorflow_hub import resolver
label_desc: Use image node_id 2 for calling the HttpCompressedFileResolver obj's underlying member method code with example usage: obj.__call__(handle) and returns: resolver, resolver, resolver