code: def _parallel_downloader(voxforge_url, archive_dir, total, counter):
      """Generate a function to download a file based on given parameters
      This works by currying the above given arguments into a closure
      in the form of the following function.
  
      :param voxforge_url: the base voxforge URL
      :param archive_dir:  the location to store the downloaded file
      :param total:        the total number of files to download
      :param counter:      an atomic counter to keep track of # of downloaded files
      :return:             a function that actually downloads a file given these params
      """
  
      def download(d):
          """Binds voxforge_url, archive_dir, total, and counter into this scope
          Downloads the given file
          :param d: a tuple consisting of (index, file) where index is the index
                    of the file to download and file is the name of the file to download
          """
          (i, file) = d
          download_url = voxforge_url + "/" + file
          c = counter.increment()
          print(
              "Downloading file {} ({}/{})...".format(i + 1, c, total)
          )
          maybe_download(
              filename_of(download_url), archive_dir, download_url
          )
  
      return download
  
imports: import codecs
  import os
  import re
  import sys
  import tarfile
  import threading
  import unicodedata
  import urllib
  from glob import glob
  from multiprocessing.pool import ThreadPool
  from os import makedirs, path
  import pandas
  from bs4 import BeautifulSoup
  from tensorflow.python.platform import gfile
  from deepspeech_training.util.downloader import maybe_download
label_desc: Use image node_id 1 for calling a global function with example usage: _parallel_downloader(voxforge_url, archive_dir, total, counter) and returns: download