from pathlib import Path


def absolute_path_for(provided_path: Path, root_path: Path) -> Path:
    """
    Return an absolute path including root_path if provided path is a relative path, else return provided_path

    Parameters
    ----------
    provided_path : Path
        absolute or relative path
    root_path : Path
        absolute path a provided relative path will be added to

    Returns
    -------
    Path
        Absolute path if provided_path is relative and root_path is absolute.  Else will return
        the provided_path which is an absolute path not on root_path.


    """
    if provided_path.is_absolute():
        return provided_path

    return Path(root_path, provided_path)