from typing import Union
from pathlib import Path


def is_relative_to(absolute_path: Union[str, Path], *other) -> bool:
    """Return True if the given another path is relative to absolute path.

    Note:
        Adapted from Python 3.9
    """
    try:
        Path(absolute_path).relative_to(*other)
        return True
    except ValueError:
        return False