code: def _append_example_to_data(data, example):
      """Append the given example to the data dictionary."""
      example_id = example["id"]
      patient_id = example["patient"]
      if patient_id in data:
          if example_id in data[example["patient"]]:
              assert example_id == data[patient_id][example_id]["id"]
              assert (
                  patient_id == data[patient_id][example_id]["patient"]
              )
              assert (
                  example["breast"]
                  == data[patient_id][example_id]["breast"]
              )
              assert (
                  example["image"]
                  == data[patient_id][example_id]["image"]
              )
              assert (
                  example["view"]
                  == data[patient_id][example_id]["view"]
              )
              data[patient_id][example_id]["abnormalities"].extend(
                  example["abnormalities"]
              )
          else:
              data[example["patient"]][example["id"]] = example
      else:
          data[example["patient"]] = {example["id"]: example}
  
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 2 for calling a global function with example usage: _append_example_to_data(data, example) without return types