class_docstr: Curated Breast Imaging Subset of DDSM.
class_docstr_tok: ["Curated","Breast","Imaging","Subset","of","DDSM","."]
code: def _split_generators_patches(self, dl_manager):
      resources_urls = {
          "calc-test": _CALC_TEST_CSV_URL,
          "calc-train": _CALC_TRAIN_CSV_URL,
          "mass-test": _MASS_TEST_CSV_URL,
          "mass-train": _MASS_TRAIN_CSV_URL,
      }
      resource_paths = dl_manager.download_and_extract(resources_urls)
      patients_data = _load_csv_files(
          dl_manager.manual_dir, resource_paths
      )
  
      # Statistics about the resulting splits.
      # Whole dataset:
      #   Num patients: 1566, of which have malignant abnormalities: 48.0%
      #   Num mamographies: 3103, of which have malignant abnormalities: 44.3%
      #   Num abnormalities: 3568, of which are malignant: 40.8%
      # Test split:
      #   Num patients: 234, of which have malignant abnormalities: 47.0%
      #   Num mamographies: 450, of which have malignant abnormalities: 44.2%
      #   Num abnormalities: 538, of which are malignant: 39.8%
      # Train split:
      #   Num patients: 1197, of which have malignant abnormalities: 48.0%
      #   Num mamographies: 2386, of which have malignant abnormalities: 44.1%
      #   Num abnormalities: 2722, of which are malignant: 41.0%
      # Validation split:
      #   Num patients: 135, of which have malignant abnormalities: 49.6%
      #   Num mamographies: 267, of which have malignant abnormalities: 46.4%
      #   Num abnormalities: 308, of which are malignant: 41.2%
      patients_test, patients_train, patients_valid = _split_patients(
          patients_data
      )
      patients_data_test = _select_patients_data(
          patients_data, patients_test
      )
      patients_data_train = _select_patients_data(
          patients_data, patients_train
      )
      patients_data_valid = _select_patients_data(
          patients_data, patients_valid
      )
  
      return [
          tfds.core.SplitGenerator(
              name=tfds.Split.TRAIN,
              gen_kwargs={
                  "generate_fn": self._generate_examples_patches,
                  "patients_data": patients_data_train,
                  "image_size": self.builder_config.image_size,
                  "patch_size": self.builder_config.patch_size,
              },
          ),
          tfds.core.SplitGenerator(
              name=tfds.Split.TEST,
              gen_kwargs={
                  "generate_fn": self._generate_examples_patches,
                  "patients_data": patients_data_test,
                  "image_size": self.builder_config.image_size,
                  "patch_size": self.builder_config.patch_size,
              },
          ),
          tfds.core.SplitGenerator(
              name=tfds.Split.VALIDATION,
              gen_kwargs={
                  "generate_fn": self._generate_examples_patches,
                  "patients_data": patients_data_valid,
                  "image_size": self.builder_config.image_size,
                  "patch_size": self.builder_config.patch_size,
              },
          ),
      ]
  
imports: import csv
  import os
  import re
  from absl import logging
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 8 for calling the CuratedBreastImagingDDSM obj's underlying member method code with example usage: obj._split_generators_patches(dl_manager) and returns: list