def validate_and_resolve_path(
    folder: str | Path,
    root: str | Path | None = None,
    base_dir: str | Path | None = None,
) -> Path:
    """Validate and resolve path by combining validation and resolution.

    Args:
        folder: Folder location containing image or mask data
        root: Root directory for the dataset
        base_dir: Base directory to restrict file access

    Returns:
        Validated and resolved absolute Path

    Example:
        >>> path = validate_and_resolve_path("subdir", "/root")
        >>> path.is_absolute()
        True
    """
    return validate_path(resolve_path(folder, root), base_dir)
Validate and resolve path by combining validation and resolution.

    Args:
        folder: Folder location containing image or mask data
        root: Root directory for the dataset
        base_dir: Base directory to restrict file access

    Returns:
        Validated and resolved absolute Path

    Example:
        >>> path = validate_and_resolve_path("subdir", "/root")
        >>> path.is_absolute()
        True
    
src/anomalib/data/utils/path.py