from pathlib import Path


def _make_path(base: Path, segment: str) -> Path:
    """
    Returns the segment relative to the given base, if it's a relative path
    Absolute paths are returned as is.
    """
    original_path = Path(segment)
    if original_path.is_absolute():
        return original_path

    return base.joinpath(original_path)