class_docstr: DatasetBuider for Youtube-vis dataset.
docstr: Returns SplitGenerators.
docstr_tok: ["Returns","SplitGenerators","."]
code: def _split_generators(
      self, dl_manager: tfds.download.DownloadManager
  ):
      """Returns SplitGenerators."""
  
      manually_downloaded_files = {
          "train_all_frames": dl_manager.manual_dir
          / "train_all_frames.zip",
          "train_annotations": dl_manager.manual_dir / "train.json",
      }
      if self.builder_config.split_train_data_range is not None:
          # Create a custom training split by subsampling the training data.
          train_data_range = self.builder_config.split_train_data_range
      else:  # Use the provided training split.
          train_data_range = None
  
      if self.builder_config.split_val_data_range is not None:
          # Create a custom validation split by subsampling the training data.
          val_data_range = self.builder_config.split_val_data_range
          manually_downloaded_files[
              "valid_all_frames"
          ] = manually_downloaded_files["train_all_frames"]
          manually_downloaded_files[
              "valid_annotations"
          ] = manually_downloaded_files["train_annotations"]
      else:  # Use the provided validation split.
          val_data_range = None
          manually_downloaded_files["valid_all_frames"] = (
              dl_manager.manual_dir / "valid_all_frames.zip"
          )
          manually_downloaded_files["valid_annotations"] = (
              dl_manager.manual_dir / "valid.json"
          )
  
      if self.builder_config.split_test_data_range is not None:
          # Create a custom test split by subsampling the training data.
          test_data_range = self.builder_config.split_test_data_range
          manually_downloaded_files[
              "test_all_frames"
          ] = manually_downloaded_files["train_all_frames"]
          manually_downloaded_files[
              "test_annotations"
          ] = manually_downloaded_files["train_annotations"]
      else:  # Use the provided test split.
          test_data_range = None
          manually_downloaded_files["test_all_frames"] = (
              dl_manager.manual_dir / "test_all_frames.zip"
          )
          manually_downloaded_files["test_annotations"] = (
              dl_manager.manual_dir / "test.json"
          )
  
      extracted_files = dl_manager.extract(manually_downloaded_files)
      val_dir = (
          "train_all_frames" if val_data_range else "valid_all_frames"
      )
      test_dir = (
          "train_all_frames" if test_data_range else "test_all_frames"
      )
  
      return {
          tfds.Split.TRAIN: self._generate_examples(
              annotations=extracted_files["train_annotations"],
              all_frames=extracted_files["train_all_frames"]
              / "train_all_frames"
              / "JPEGImages",
              video_range_to_use=train_data_range,
          ),
          tfds.Split.VALIDATION: self._generate_examples(
              annotations=extracted_files["valid_annotations"],
              all_frames=extracted_files["valid_all_frames"]
              / val_dir
              / "JPEGImages",
              video_range_to_use=val_data_range,
          ),
          tfds.Split.TEST: self._generate_examples(
              annotations=extracted_files["test_annotations"],
              all_frames=extracted_files["test_all_frames"]
              / test_dir
              / "JPEGImages",
              video_range_to_use=test_data_range,
          ),
      }
  
imports: from __future__ import annotations
  import collections
  import json
  import os
  from typing import Any, Dict, List, Optional, Tuple, Union
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling the YoutubeVis obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: dict