def is_package_with_extras_installed(name: str, extras: List[str]) -> bool:
    """Checks the given extras of a package are installed.

    Args:
        name: the name of the package to check.
        extras: the extras to check.

    Returns:
        `True`, if the extras are installed, `False` otherwise.
    """
    try:
        requirements = importlib.metadata.requires(name)
    except importlib.metadata.PackageNotFoundError:
        return False

    grouped_requirements = _group_by_extra(requirements)
    available_extras = list(grouped_requirements.keys())
    for extra in extras:
        if extra not in available_extras:
            raise KeyError(f"'{name}' package does not provide '{extra}' extra")
        for requirement in grouped_requirements[extra]:
            try:
                importlib.metadata.version(requirement)
            except importlib.metadata.PackageNotFoundError:
                return False

    return True
Checks the given extras of a package are installed.

    Args:
        name: the name of the package to check.
        extras: the extras to check.

    Returns:
        `True`, if the extras are installed, `False` otherwise.
    
argilla-v1/src/argilla_v1/utils/dependency.py