code: def test_delete_script(tmp_path: pathlib.PurePath):
      # Create paths
      for dataset_dir in [
          "extracted",  # DownloadManager directories should be preserved.
          "dataset/config/1.0.0",
          "my_dataset/other_dir",
          "my_dataset/1.0.0/other",
          "my_dataset/1.1.0",
          "my_dataset/1.2.0/diff",
          "my_dataset/1.2.0/other",
          "my_dataset/1.3.0",
          "my_other_dataset/config/1.2.0",
          "my_other_dataset/config/1.3.0",
          "my_other_dataset/other_config/1.2.0",
          "my_other_dataset/other_config/1.3.0",
          "my_other_dataset/yet_other_config",
          "my_other_dataset/config_deprecated/1.2.0",
          "old_dataset",
      ]:
          tmp_path.joinpath(dataset_dir).mkdir(parents=True)
  
      (
          dirs_to_keep,
          dirs_to_delete,
      ) = delete_old_versions._get_extra_dirs(
          data_dir=tmp_path,
          current_full_names=[
              "non_generated_dataset0/1.0.0",
              "non_generated_dataset1/config/1.0.0",
              "dataset/config/1.0.0",
              "my_dataset/1.2.0",
              "my_dataset/1.3.0",
              "my_other_dataset/config/1.3.0",
              "my_other_dataset/other_config/1.3.0",
              "another_dataset/config/1.2.0",
              "another_dataset/other_config/1.1.0",
          ],
      )
      assert dirs_to_keep == _norm_path(
          tmp_path,
          [
              "dataset/config/1.0.0",
              "my_dataset/1.2.0",
              "my_dataset/1.3.0",
              "my_other_dataset/config/1.3.0",
              "my_other_dataset/other_config/1.3.0",
          ],
      )
      assert dirs_to_delete == _norm_path(
          tmp_path,
          [
              "my_dataset/1.0.0",
              "my_dataset/1.1.0",
              "my_dataset/other_dir",
              "my_other_dataset/config/1.2.0",
              "my_other_dataset/config_deprecated",
              "my_other_dataset/other_config/1.2.0",
              "my_other_dataset/yet_other_config",
              "old_dataset",
          ],
      )
  
imports: import pathlib
  from typing import List
  from tensorflow_datasets.scripts.cleanup import delete_old_versions
label_desc: Use image node_id 2 for calling a global function with example usage: test_delete_script(tmp_path) without return types