code: def _prune_subdirs(dir_: str) -> None:
      
      for logdir in [path.join(dir_, f) for f in listdir(dir_) if is_train_dir(path.join(dir_, f))]:
          for subdir in [path.join(logdir, f) for f in listdir(logdir) if path.isdir(path.join(logdir, f))]:
              _safe_rmtree(subdir)
docs: Delete all subdirs in training log dirs.
  
      :param dir_: dir with training log dirs