code: def _display_dirs(
      data_dir: pathlib.Path,
      dirs_to_keep: List[pathlib.Path],
      dirs_to_delete: List[pathlib.Path],
  ) -> None:
      """Display dirs to keep and delete."""
      dirs_to_keep = set(dirs_to_keep)
      dirs_to_delete = set(dirs_to_delete)
  
      # Format dirs to strip prefix and keep in bold.
      def _format(d, keep: bool):
          d = str(d.relative_to(data_dir))
          if keep:
              d = termcolor.colored(f"{d} (*)", attrs=["bold"])
          return d
  
      all_dirs = [
          _format(d, keep=d in dirs_to_keep)
          for d in sorted(dirs_to_keep | dirs_to_delete)
      ]
      # Preview the dirs to delete
      print(
          f"The script will delete the following modifications to `{data_dir}`:"
      )
      print(
          "Path indicated in bold (*) will be kept, the other will be deleted.\n"
      )
      print("\n".join(all_dirs))
      print()
      print(
          f"{len(dirs_to_delete)} datasets to delete, {len(dirs_to_keep)} to "
          "keep.\n"
      )
  
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 6 for calling a global function with example usage: _display_dirs(data_dir, dirs_to_keep, dirs_to_delete) and returns: d