code: def get_themes() -> dict[str, EntryPoint]:
      """Return a dict of all installed themes as {name: EntryPoint}."""
      themes: dict[str, EntryPoint] = {}
      eps: dict[EntryPoint, None] = dict.fromkeys(
          entry_points(group="mkdocs.themes")
      )
      builtins = {
          ep.name
          for ep in eps
          if ep.dist is not None and ep.dist.name == "mkdocs"
      }
  
      for theme in eps:
          assert theme.dist is not None
  
          if theme.name in builtins and theme.dist.name != "mkdocs":
              raise exceptions.ConfigurationError(
                  f"The theme '{theme.name}' is a builtin theme but the package '{theme.dist.name}' "
                  "attempts to provide a theme with the same name."
              )
          elif theme.name in themes:
              other_dist = themes[theme.name].dist
              assert other_dist is not None
              log.warning(
                  f"A theme named '{theme.name}' is provided by the Python packages '{theme.dist.name}' "
                  f"and '{other_dist.name}'. The one in '{theme.dist.name}' will be used."
              )
  
          themes[theme.name] = theme
  
      return themes
  
imports: from __future__ import annotations
  import functools
  import logging
  import os
  import posixpath
  import re
  import shutil
  import sys
  import warnings
  from collections import defaultdict
  from datetime import datetime, timezone
  from pathlib import PurePath
  from typing import TYPE_CHECKING, Collection, Iterable, MutableSequence, TypeVar
  from urllib.parse import urlsplit
  from mkdocs import exceptions
  from mkdocs.utils.yaml import get_yaml_loader, yaml_load
label_desc: Use image node_id 17 for calling a global function with example usage: get_themes() and returns: themes