code: def _delete_metadata_dirs(metadata_dir: str) -> None:
      """Removes metadata that are not present in the registered versions of TFDS.
  
      Args:
        metadata_dir: Path to metadata directory (testing/metadata).
      """
      registered_names = set(tfds.core.load.list_full_names())
      existing_names = set(_extract_metadata_versions(metadata_dir))
      for extra_full_name in sorted(existing_names - registered_names):
          path_to_delete = os.path.join(metadata_dir, extra_full_name)
          print(f"Delete: {path_to_delete}")
          if FLAGS.dry_run:
              continue
          tf.io.gfile.rmtree(path_to_delete)
  
file_path: datasets/tensorflow_datasets/scripts/cleanup/metadata_cleanup.py
imports: import os
  from typing import List
  from absl import app
  from absl import flags
  import tensorflow_datasets
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: _delete_metadata_dirs(metadata_dir) without return types