code: def entry_points(
      text: str, text_source="entry-points"
  ) -> Dict[str, dict]:
      """Given the contents of entry-points file,
      process it into a 2-level dictionary (``dict[str, dict[str, str]]``).
      The first level keys are entry-point groups, the second level keys are
      entry-point names, and the second level values are references to objects
      (that correspond to the entry-point value).
      """
      parser = ConfigParser(default_section=None, delimiters=("=",))  # type: ignore
      parser.optionxform = str  # case sensitive
      parser.read_string(text, text_source)
      groups = {k: dict(v.items()) for k, v in parser.items()}
      groups.pop(parser.default_section, None)
      return groups
  
imports: import ast
  import importlib
  import os
  import pathlib
  import sys
  from glob import iglob
  from configparser import ConfigParser
  from importlib.machinery import ModuleSpec
  from itertools import chain
  from typing import TYPE_CHECKING, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, TypeVar, Union, cast
  from pathlib import Path
  from types import ModuleType
  from distutils.errors import DistutilsOptionError
  from .._path import same_path
  from ..warnings import SetuptoolsWarning
label_desc: Use image node_id 17 for calling a global function with example usage: entry_points(text, text_source) and returns: groups