def _normalise_path(path: Union[str, pathlib.Path]) -> pathlib.Path:
    """
    Ensures a path is parsed.

    :param path: A path string or Path object.
    :return: The path as a Path object.
    """
    if isinstance(path, str):
        return pathlib.Path(path)
    return path