class_docstr: Helper function for downloading external dependency
  
  >>> from nlpaug.util.file.download import DownloadUtil
docstr: :param str file_path: File path for unzip
  
  >>> DownloadUtil.unzip('zip_file.zip')
docstr_tok: [":","param","str","file_path",":","File","path","for","unzip",">",">",">","DownloadUtil.unzip","(","'zip_file.zip","'",")"]
code: def unzip(file_path, dest_dir=None):
      """
      :param str file_path: File path for unzip
  
      >>> DownloadUtil.unzip('zip_file.zip')
  
      """
  
      if dest_dir is None:
          dest_dir = os.path.dirname(file_path)
  
      if file_path.endswith(".zip"):
          with zipfile.ZipFile(file_path, "r") as zip_ref:
              zip_ref.extractall(dest_dir)
      elif file_path.endswith("tar.gz") or file_path.endswith("tgz"):
          tar = tarfile.open(file_path, "r:gz")
          tar.extractall(dest_dir)
          tar.close()
      elif file_path.endswith("tar"):
          tar = tarfile.open(file_path, "r:")
          tar.extractall(dest_dir)
          tar.close()
      elif file_path.endswith("bin.gz"):
          with gzip.open(file_path, "rb") as f_in:
              with open(file_path.replace(".gz", ""), "wb") as f_out:
                  shutil.copyfileobj(f_in, f_out)
  
file_path: nlpaug/nlpaug/util/file/download.py
imports: import gzip
  import os
  import shutil
  import tarfile
  import urllib
  import zipfile
  import gdown
  import requests
label_desc: Use image node_id 6 for calling the DownloadUtil obj's underlying member method code with example usage: obj.unzip(file_path, dest_dir) without return types