code: def download_images(image_urls, output_dir, num_workers=None):
      """Downloads the images from the given URLs.
  
      The filenames in ``output_dir`` are the basenames of the URLs, which are
      assumed to be unique.
  
      Args:
          image_urls: a list of image URLs to download
          output_dir: the directory to write the images
          num_workers (None): a suggested number of threads to use
  
      Returns:
          the list of downloaded image paths
      """
      num_workers = fou.recommend_thread_pool_workers(num_workers)
  
      inputs = []
      for url in image_urls:
          filename = os.path.basename(urllib.parse.urlparse(url).path)
          outpath = os.path.join(output_dir, filename)
          inputs.append((url, outpath))
  
      if num_workers <= 1:
          _download_images(inputs)
      else:
          _download_images_multi(inputs, num_workers)
  
      return tuple(zip(*inputs))[1]
  
imports: import logging
  import multiprocessing.dummy
  import requests
  import os
  import pathlib
  import urllib
  import eta.core.image
  import eta.core.serial
  import eta.core.utils
  import eta.core.video
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.utils
label_desc: Use image node_id 5 for calling a global function with example usage: download_images(image_urls, output_dir, num_workers) and returns: tuple