class_docstr: SCAN task / splits as proposed by Brenden M. Lake and Marco Baroni.
class_docstr_tok: ["SCAN","task","\/","splits","as","proposed","by","Brenden","M.","Lake","and","Marco","Baroni","."]
docstr: Returns SplitGenerators.
docstr_tok: ["Returns","SplitGenerators","."]
code: def _split_generators(self, dl_manager):
      """Returns SplitGenerators."""
      data_dir = dl_manager.download_and_extract(_DATA_URL)
      data_dir = os.path.join(
          data_dir, "SCAN-master", self.builder_config.directory
      )
      split = self.builder_config.name
      splitfile = self.builder_config.splitfile
      if "mcd" in split:
          split_dir = dl_manager.download_and_extract(_MCD_SPLITS_URL)
          split_dir = os.path.join(split_dir, "scan-splits")
          splitfile = os.path.join(split_dir, splitfile)
      if splitfile:
          kwargs = {
              "datapath": os.path.join(data_dir, "tasks.txt"),
              "splitpath": splitfile,
          }
          train_kwargs = kwargs.copy()
          train_kwargs["splitname"] = "train"
          test_kwargs = kwargs.copy()
          test_kwargs["splitname"] = "test"
      else:
          train_kwargs = {
              "datapath": os.path.join(
                  data_dir, "tasks_train_" + split + ".txt"
              )
          }
          test_kwargs = {
              "datapath": os.path.join(
                  data_dir, "tasks_test_" + split + ".txt"
              )
          }
      return [
          tfds.core.SplitGenerator(
              name=tfds.Split.TRAIN, gen_kwargs=train_kwargs
          ),
          tfds.core.SplitGenerator(
              name=tfds.Split.TEST, gen_kwargs=test_kwargs
          ),
      ]
  
file_path: datasets/tensorflow_datasets/datasets/scan/scan_dataset_builder.py
imports: import json
  import os
  from etils import epath
  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