class_docstr: Healthy and unhealthy plant leaves dataset.
class_docstr_tok: ["Healthy","and","unhealthy","plant","leaves","dataset","."]
docstr: Returns SplitGenerators.
docstr_tok: ["Returns","SplitGenerators","."]
code: def _split_generators(self, dl_manager):
      """Returns SplitGenerators."""
      # Batch download for this dataset is broken, therefore images have to be
      # downloaded independently from a list of urls.
      with tf.io.gfile.GFile(
          os.fspath(tfds.core.tfds_path(_URLS_FNAME))
      ) as f:
          name_to_url_map = {
              os.path.basename(l.strip()): l.strip()
              for l in f.readlines()
          }
          retry_count = 0
          image_files = {}
          # We have to retry due to rare 504 HTTP errors. Downloads are cached,
          # therefore this shouldn't cause successful downloads to be retried.
          while True:
              try:
                  image_files = dl_manager.download(name_to_url_map)
                  break
              except tfds.download.DownloadError:
                  retry_count += 1
                  if retry_count == _MAX_DOWNLOAD_RETRY:
                      raise DownloadRetryLimitReachedError(
                          "Retry limit reached. Try downloading the dataset again."
                      )
          return [
              tfds.core.SplitGenerator(
                  name=tfds.Split.TRAIN,
                  gen_kwargs={"image_files": image_files},
              )
          ]
  
file_path: datasets/tensorflow_datasets/datasets/plantae_k/plantae_k_dataset_builder.py
imports: import os
  import re
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling the Builder obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: list