code: def fetch_wmt_parallel_dataset(
      selection: Union[str, List[str], List[List[str]]],
      lang_pair: str = "de-en",
      path: Optional[str] = _BASE_DATASET_PATH,
      overwrite: bool = False,
  ) -> Tuple[List[str], List[str]]:
      """
  
      Parameters
      ----------
      selection
      lang_pair
      path
      overwrite
  
      Returns
      -------
      src_corpus_paths
      target_corpus_paths
      """
      src_lang, tgt_lang = split_lang_pair(lang_pair)
      base_url_info = _PARA_URLS
      if isinstance(selection, str):
          selection = [selection]
      elif isinstance(selection, list):
          if isinstance(selection[0], list):
              src_corpus_paths = []
              tgt_corpus_paths = []
              for ele in selection:
                  (
                      ele_src_corpus_paths,
                      ele_tgt_corpus_paths,
                  ) = fetch_wmt_parallel_dataset(
                      ele, lang_pair, path, overwrite
                  )
                  src_corpus_paths.extend(ele_src_corpus_paths)
                  tgt_corpus_paths.extend(ele_tgt_corpus_paths)
              return src_corpus_paths, tgt_corpus_paths
      else:
          raise NotImplementedError
      for sel in selection:
          base_url_info = base_url_info[sel]
      # Check the pair is valid
      available_pairs = set(base_url_info.keys())
      if "url" in available_pairs:
          available_pairs.remove("url")
      if str(src_lang) + "-" + str(tgt_lang) in available_pairs:
          matched_pair = "{}-{}".format(src_lang, tgt_lang)
      elif str(tgt_lang) + "-" + str(src_lang) in available_pairs:
          matched_pair = "{}-{}".format(tgt_lang, src_lang)
      else:
          raise ValueError(
              "Unsupported pairs, src_lang={}, tgt_lang={}. All supported: {}".format(
                  src_lang, tgt_lang, available_pairs
              )
          )
      save_dir_path = os.path.join(path, *(selection + [matched_pair]))
      if not os.path.exists(save_dir_path):
          os.makedirs(save_dir_path)
      out_src_path = os.path.join(save_dir_path, src_lang + ".txt")
      out_tgt_path = os.path.join(save_dir_path, tgt_lang + ".txt")
      # Check for whether we can load the cached version
      # TODO we can do something smarter here
      if (
          os.path.exists(out_src_path)
          and os.path.exists(out_tgt_path)
          and not overwrite
      ):
          print(
              "Found data in {}, skip:\n"
              "\tSource: {}\n"
              "\tTarget: {}\n".format(
                  selection + [lang_pair], out_src_path, out_tgt_path
              )
          )
          return [out_src_path], [out_tgt_path]
      pair_data_info = base_url_info[matched_pair]
      if "url" in pair_data_info:
          url_l = pair_data_info["url"]
      else:
          url_l = base_url_info["url"]
      # Download the data + Concatenate the file-parts (if necessary)
      download_fname_l = []
      if isinstance(url_l, str):
          url_l = [url_l]
      for url in url_l:
          original_filename = url[url.rfind("/") + 1 :]
          sha1_hash = _URL_FILE_STATS[url]
          if "url" in pair_data_info:
              save_path_l = (
                  [path] + selection + [matched_pair, original_filename]
              )
          else:
              save_path_l = [path] + selection + [original_filename]
          download_fname = _download_with_mirror(
              url, path=os.path.join(*save_path_l), sha1_hash=sha1_hash
          )
          download_fname_l.append(download_fname)
      if len(download_fname_l) > 1:
          data_path = concatenate_files(download_fname_l)
      else:
          data_path = download_fname_l[0]
      if "all" in pair_data_info:
          src_name, tgt_name, src_tgt_name = (
              None,
              None,
              pair_data_info["all"],
          )
      else:
          src_name, tgt_name, src_tgt_name = (
              pair_data_info[src_lang],
              pair_data_info[tgt_lang],
              None,
          )
      print(
          "Prepare data for {}\n"
          "\tCompressed File: {}\n"
          "\t{}: {}\n"
          "\t{}: {}\n".format(
              selection + [lang_pair],
              data_path,
              src_lang,
              out_src_path,
              tgt_lang,
              out_tgt_path,
          )
      )
      extract_src_tgt_corpus(
          data_path,
          data_lang_pair=matched_pair,
          src_lang=src_lang,
          tgt_lang=tgt_lang,
          src_name=src_name,
          tgt_name=tgt_name,
          src_tgt_name=src_tgt_name,
          out_src_path=out_src_path,
          out_tgt_path=out_tgt_path,
      )
      assert file_line_number(out_src_path) == file_line_number(
          out_tgt_path
      )
      return [out_src_path], [out_tgt_path]
  
imports: from typing import List, Union, IO, AnyStr, Tuple, Optional
  import re
  import os
  import argparse
  import zipfile
  import shutil
  import functools
  import tarfile
  import gzip
  import json
  from xml.etree import ElementTree
  from gluonnlp.data.filtering import ProfanityFilter
  from gluonnlp.utils.misc import file_line_number, download, load_checksum_stats
  from gluonnlp.base import get_data_home_dir, get_repo_url
label_desc: Use image node_id 12 for calling a global function with example usage: fetch_wmt_parallel_dataset(selection, lang_pair, path, overwrite) and returns: list,  list, list,  list, src_corpus_paths,  tgt_corpus_paths