code: def download_wikicorpus(lang, date, output):
      """
      lang: the language code such as en, zh
      date: string, the date of the Wikipedia with format of YYYYMMDD, or 'latest'.
      """
      if not os.path.exists(output):
          os.makedirs(output)
      if lang not in __LANGUAGES_BANK:
          raise ValueError("Unsupported language code")
      language = lang.replace("-", "_")
      output_file = os.path.join(
          output, "download", language, date, "wikicorpus.xml.bz2"
      )
      download(get_url(language, date), output_file)
      return output_file
  
imports: import os
  import sys
  import glob
  import math
  import time
  import tarfile
  import argparse
  import multiprocessing
  from collections import defaultdict
  from gluonnlp.utils.misc import download, load_checksum_stats
  from gluonnlp.utils.lazy_imports import try_import_wikiextractor
  from gluonnlp.base import get_repo_url
  from itertools import islice
  import nltk
  import statistics
  from segment_sentences import Sharding, segment_sentences, NLTKSegmenter
label_desc: Use image node_id 5 for calling a global function with example usage: download_wikicorpus(lang, date, output) and returns: output_file