code: def _group_by_extra(dependencies: List[str]) -> Dict[str, List[str]]:
      grouped = {"base": []}
  
      for dep in dependencies:
          # Extract the name of the dependency by splitting at the first space or '['
          dep_name = dep.split()[0].split("[")[0]
  
          if "; extra ==" in dep:
              # Split the dependency and the extra value
              _, extra_value = dep.split(" ; extra ==")
              extra_value = extra_value.strip().strip("'")
  
              # Append the dependency name to the right extra group
              if extra_value not in grouped:
                  grouped[extra_value] = []
              grouped[extra_value].append(dep_name)
          else:
              grouped["base"].append(dep_name)
  
      return grouped
  
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 4 for calling a global function with example usage: _group_by_extra(dependencies) and returns: grouped