def _validate_dependency(func: Callable[..., Any]) -> Callable[..., Any]:
    """
    Decorator to validate the presence and version of `oracle-ads`.

    This decorator checks that `oracle-ads` is installed and that its version meets
    the minimum requirement. If not, it raises an error.

    Args:
        func: The function to wrap with the dependency validation.

    Returns:
        The wrapped function.

    Raises:
        ImportError: If `oracle-ads` is not installed.
        UnsupportedOracleAdsVersionError: If the installed version is below the required version.

    """

    @wraps(func)
    def wrapper(*args, **kwargs) -> Any:
        try:
            from ads import __version__ as ads_version

            if version.parse(ads_version) < version.parse(MIN_ADS_VERSION):
                raise UnsupportedOracleAdsVersionError(ads_version, MIN_ADS_VERSION)
        except ImportError as ex:
            raise ImportError(
                "Could not import `oracle-ads` Python package. "
                "Please install it with `pip install oracle-ads`."
            ) from ex
        return func(*args, **kwargs)

    return wrapper

    Decorator to validate the presence and version of `oracle-ads`.

    This decorator checks that `oracle-ads` is installed and that its version meets
    the minimum requirement. If not, it raises an error.

    Args:
        func: The function to wrap with the dependency validation.

    Returns:
        The wrapped function.

    Raises:
        ImportError: If `oracle-ads` is not installed.
        UnsupportedOracleAdsVersionError: If the installed version is below the required version.

    
llama-index-integrations/llms/llama-index-llms-oci-data-science/llama_index/llms/oci_data_science/utils.py