code: 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
  
file_path: argilla/src/argilla/utils/dependency.py
imports: import functools
  import importlib.metadata
  import importlib.util
  import operator
  import re
  import sys
  from typing import Callable, Dict, List, Optional, TypeVar, Union
  from packaging import version
label_desc: Use image node_id 5 for calling a global function with example usage: is_package_with_extras_installed(name, extras) and returns: True, False, False