class_docstr: Sun397 Scene Recognition Benchmark.
class_docstr_tok: ["Sun397","Scene","Recognition","Benchmark","."]
code: def _split_generators(self, dl_manager):
      paths = dl_manager.download_and_extract(
          {
              "images": tfds.download.Resource(
                  url=_SUN397_URL + "SUN397.tar.gz",
                  extract_method=tfds.download.ExtractMethod.NO_EXTRACT,
              ),
              "partitions": _SUN397_URL + "download/Partitions.zip",
          }
      )
      if not isinstance(paths, dict):
          # While testing download_and_extract() returns the dir containing the
          # test files.
          paths = {
              "images": os.path.join(paths, "SUN397.tar.gz"),
              "partitions": os.path.join(paths, "Partitions"),
          }
      images = tfds.download.Resource(
          path=paths["images"],
          extract_method=tfds.download.ExtractMethod.TAR_GZ_STREAM,
      )
      if self.builder_config.name == "tfds":
          subset_images = self._get_tfds_subsets_images()
          return [
              tfds.core.SplitGenerator(
                  name=tfds.Split.TRAIN,
                  gen_kwargs=dict(
                      archive=dl_manager.iter_archive(images),
                      subset_images=subset_images["tr"],
                  ),
              ),
              tfds.core.SplitGenerator(
                  name=tfds.Split.TEST,
                  gen_kwargs=dict(
                      archive=dl_manager.iter_archive(images),
                      subset_images=subset_images["te"],
                  ),
              ),
              tfds.core.SplitGenerator(
                  name=tfds.Split.VALIDATION,
                  gen_kwargs=dict(
                      archive=dl_manager.iter_archive(images),
                      subset_images=subset_images["va"],
                  ),
              ),
          ]
      else:
          subset_images = self._get_partition_subsets_images(
              paths["partitions"]
          )
          return [
              tfds.core.SplitGenerator(
                  name=tfds.Split.TRAIN,
                  gen_kwargs=dict(
                      archive=dl_manager.iter_archive(images),
                      subset_images=subset_images["tr"],
                  ),
              ),
              tfds.core.SplitGenerator(
                  name=tfds.Split.TEST,
                  gen_kwargs=dict(
                      archive=dl_manager.iter_archive(images),
                      subset_images=subset_images["te"],
                  ),
              ),
          ]
  
imports: import io
  import os
  from absl import logging
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: list, list