code: def _extract_dirs_from_future(
      dirs_to_keep: List[pathlib.Path],
      dirs_to_delete: List[pathlib.Path],
      future: concurrent.futures.Future,
  ) -> None:
      """Merge all results from all subtasks."""
      task_result = future.result()
      dirs_to_keep.extend(task_result.to_keep)
      dirs_to_delete.extend(task_result.to_delete)
      for sub_task in task_result.sub_tasks:
          _extract_dirs_from_future(
              dirs_to_keep=dirs_to_keep,
              dirs_to_delete=dirs_to_delete,
              future=sub_task,
          )
  
file_path: datasets/tensorflow_datasets/scripts/cleanup/delete_old_versions.py
imports: import collections
  import concurrent.futures
  import dataclasses
  import os
  import pathlib
  from typing import Dict, Iterable, List, Tuple
  from absl import app
  from absl import flags
  import tensorflow_datasets
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import termcolor
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_dirs_from_future(dirs_to_keep, dirs_to_delete, future) without return types