code: def fetch_archive_from_http(url, output_dir, proxies=None):
      """
      Fetch an archive (zip or tar.gz) from a url via http and extract content to an output directory.
  
      :param url: http address
      :type url: str
      :param output_dir: local path
      :type output_dir: str
      :param proxies: proxies details as required by requests library
      :type proxies: dict
      :return: bool if anything got fetched
      """
      # verify & prepare local directory
      path = Path(output_dir)
      if not path.exists():
          path.mkdir(parents=True)
  
      is_not_empty = len(list(Path(path).rglob("*"))) > 0
      if is_not_empty:
          logger.info(
              f"Found data stored in `{output_dir}`. Delete this first if you really want to fetch new data."
          )
          return False
      else:
          logger.info(f"Fetching from {url} to `{output_dir}`")
  
          # download & extract
          with tempfile.NamedTemporaryFile() as temp_file:
              http_get(url, temp_file, proxies=proxies)
              temp_file.flush()
              temp_file.seek(0)  # making tempfile accessible
              # extract
              if url[-4:] == ".zip":
                  archive = zipfile.ZipFile(temp_file.name)
                  archive.extractall(output_dir)
              elif url[-7:] == ".tar.gz":
                  archive = tarfile.open(temp_file.name)
                  archive.extractall(output_dir)
              # temp_file gets deleted here
          return True
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import json
  import logging
  import os
  import tempfile
  import tarfile
  import zipfile
  from functools import wraps
  from hashlib import sha256
  from io import open
  from pathlib import Path
  import boto3
  import numpy
  import requests
  from botocore.exceptions import ClientError
  from dotmap import DotMap
  from tqdm import tqdm
  from transformers.file_utils import cached_path
label_desc: Use image node_id 9 for calling a global function with example usage: fetch_archive_from_http(url, output_dir, proxies) and returns: False, True