import pathlib


def _is_valid_doc_version(folder: pathlib.Path) -> bool:
    """
    Test if a version folder contains valid documentation.

    A version folder contains documentation if:
    - is a directory
    - contains an `index.html` file
    """
    if not folder.is_dir():
        return False
    if not (folder / "index.html").exists():
        return False

    return True