from pathlib import Path
from typing import Iterator


def _subdirs(base_dir: Path) -> Iterator[Path]:
    """Return the subdirectories inside the given directory."""
    return (p for p in base_dir.iterdir() if p.is_dir())