class_docstr: Curated Breast Imaging Subset of DDSM.
class_docstr_tok: ["Curated","Breast","Imaging","Subset","of","DDSM","."]
code: def _generate_examples_original(
      self, patients_data, yield_from_train_csv
  ):
      def _include_example_in_split(example):
          if yield_from_train_csv:
              return example["csv_key"] == "train"
          else:
              return example["csv_key"] == "test"
  
      for _, patient_examples in sorted(patients_data.items()):
          for _, example in sorted(patient_examples.items()):
              if _include_example_in_split(example):
                  record = {
                      "id": example["id"],
                      "patient": example["patient"],
                      "image": example["image"],
                      "view": example["view"],
                      "breast": example["breast"],
                      # pylint: disable=g-complex-comprehension
                      "abnormalities": [
                          {
                              k: v
                              for k, v in abnormality.items()
                              if k not in ["type"]
                          }
                          for abnormality in example["abnormalities"]
                      ],
                      # pylint: enable=g-complex-comprehension
                  }
                  yield example["id"], record
  
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 10 for calling the CuratedBreastImagingDDSM obj's underlying member method code with example usage: obj._generate_examples_original(patients_data, yield_from_train_csv) and returns: unknown, unknown