code: def test_http_locations(self):
      self._generate_module()
  
      m = hub.load(
          "http://localhost:%d/test_module.tgz" % self.server_port
      )
      self.assertAllClose(m(11), 121)
  
      # Test caching using custom filesystem (file://) to make sure that the
      # TF Hub library can operate on such paths.
      try:
          root_dir = "file://%s" % self.get_temp_dir()
          cache_dir = "%s_%s" % (root_dir, "cache")
          tf.compat.v1.gfile.MakeDirs(cache_dir)
          os.environ["TFHUB_CACHE_DIR"] = cache_dir
          m = hub.load(
              "http://localhost:%d/test_module.tgz" % self.server_port
          )
          self.assertAllClose(m(11), 121)
  
          cache_content = sorted(
              tf.compat.v1.gfile.ListDirectory(cache_dir)
          )
          logging.info("Cache context: %s", str(cache_content))
          self.assertEqual(2, len(cache_content))
          self.assertTrue(cache_content[1].endswith(".descriptor.txt"))
          module_files = sorted(
              tf.compat.v1.gfile.ListDirectory(
                  os.path.join(cache_dir, cache_content[0])
              )
          )
          self.assertListEqual(
              [
                  "assets",
                  "fingerprint.pb",
                  "saved_model.pb",
                  "variables",
              ],
              module_files,
          )
      finally:
          os.unsetenv("TFHUB_CACHE_DIR")
  
file_path: hub/tensorflow_hub/e2e_test.py
imports: import os
  import tarfile
  from absl import logging
  import tensorflow
  import tensorflow_hub
  from tensorflow_hub import test_utils
label_desc: Use image node_id 5 for calling the End2EndTest obj's underlying member method code with example usage: obj.test_http_locations() without return types