class_docstr: Wikipedia dataset.
class_docstr_tok: ["Wikipedia","dataset","."]
code: def _split_generators(self, dl_manager):
      def _base_url(lang):
          tmpl = _BASE_URL_TMPL
          if self.builder_config.date <= "20220620":
              tmpl = _BASE_URL_TMPL_OLD
          return tmpl.format(
              lang=lang.replace("-", "_"),
              date=self._builder_config.date,
          )
  
      lang = self._builder_config.language
  
      info_url = _base_url(lang) + _INFO_FILE
      # Use dictionary since testing mock always returns the same result.
      downloaded_files = dl_manager.download_and_extract(
          {"info": info_url}
      )
  
      xml_urls = []
      total_bytes = 0
      info_path = epath.Path(downloaded_files["info"])
      dump_info = json.loads(info_path.read_text("utf-8"))
      multistream_dump_info = dump_info["jobs"][
          "articlesmultistreamdump"
      ]
      assert (
          multistream_dump_info["status"] == "done"
      ), "Specified dump (%s) multistream status is not 'done': %s" % (
          _base_url(lang),
          multistream_dump_info["status"],
      )
  
      for fname, info in multistream_dump_info["files"].items():
          if ".xml" not in fname:
              continue
          total_bytes += info["size"]
          xml_urls.append(_base_url(lang) + fname)
  
      # Use dictionary since testing mock always returns the same result.
      downloaded_files = dl_manager.download({"xml": xml_urls})
  
      return {
          tfds.Split.TRAIN: self._generate_examples(
              downloaded_files["xml"], lang
          )
      }
  
file_path: datasets/tensorflow_datasets/text/wikipedia.py
imports: import bz2
  import dataclasses
  import json
  import re
  from absl import flags
  from absl import logging
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling the Wikipedia obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: dict, tmpl