def _dir_contains_videos(root: str, extensions: tuple[str, ...]) -> bool:
    """Checks whether the directory contains video files.

    Args:
        root: Root directory path.
        extensions: Tuple of valid video file extensions.

    Returns:
        True if the root directory contains video files, False otherwise.
    """
    with os.scandir(root) as scan_dir:
        return any(f.name.lower().endswith(extensions) for f in scan_dir)
Checks whether the directory contains video files.

    Args:
        root: Root directory path.
        extensions: Tuple of valid video file extensions.

    Returns:
        True if the root directory contains video files, False otherwise.
    
lightly/data/_helpers.py