code: def download_and_extract(directory, subset, urls):
      """Download and extract the given split of dataset.
  
      Args:
          directory: the directory where to put the downloaded data.
          subset: subset name of the corpus.
          urls: the list of urls to download the data file.
      """
      if not gfile.Exists(directory):
          gfile.MakeDirs(directory)
  
      try:
          for url in urls:
              zip_filepath = os.path.join(directory, url.split("/")[-1])
              if os.path.exists(zip_filepath):
                  continue
              logging.info("Downloading %s to %s" % (url, zip_filepath))
              subprocess.call(
                  "wget %s --user %s --password %s -O %s"
                  % (url, USER["user"], USER["password"], zip_filepath),
                  shell=True,
              )
  
              statinfo = os.stat(zip_filepath)
              logging.info(
                  "Successfully downloaded %s, size(bytes): %d"
                  % (url, statinfo.st_size)
              )
  
          # concatenate all parts into zip files
          if ".zip" not in zip_filepath:
              zip_filepath = "_".join(zip_filepath.split("_")[:-1])
              subprocess.call(
                  "cat %s* > %s.zip" % (zip_filepath, zip_filepath),
                  shell=True,
              )
              zip_filepath += ".zip"
          extract_path = zip_filepath.strip(".zip")
  
          # check zip file md5sum
          md5 = hashlib.md5(open(zip_filepath, "rb").read()).hexdigest()
          if md5 != MD5SUM[subset]:
              raise ValueError("md5sum of %s mismatch" % zip_filepath)
  
          with zipfile.ZipFile(zip_filepath, "r") as zfile:
              zfile.extractall(directory)
              extract_path_ori = os.path.join(
                  directory, zfile.infolist()[0].filename
              )
              subprocess.call(
                  "mv %s %s" % (extract_path_ori, extract_path),
                  shell=True,
              )
      finally:
          # gfile.Remove(zip_filepath)
          pass
  
file_path: TTS/TTS/speaker_encoder/utils/prepare_voxceleb.py
imports: import os
  import sys
  import zipfile
  import subprocess
  import hashlib
  import pandas
  from absl import logging
  import tensorflow
  import soundfile
label_desc: Use image node_id 1 for calling a global function with example usage: download_and_extract(directory, subset, urls) without return types