def _contains_subdirs(root: str) -> bool:
    """Checks whether the directory contains subdirectories.

    Args:
        root: Root directory path.

    Returns:
        True if the root directory contains subdirectories (excluding "lightly_outputs"), False otherwise.
    """
    with os.scandir(root) as scan_dir:
        return any(not _is_lightly_output_dir(f.name) for f in scan_dir if f.is_dir())
Checks whether the directory contains subdirectories.

    Args:
        root: Root directory path.

    Returns:
        True if the root directory contains subdirectories (excluding "lightly_outputs"), False otherwise.
    
lightly/data/_helpers.py