code: def _describe_metadata_elements(group):
      infos = {}
      from datalad.support.entrypoints import iter_entrypoints
      from importlib import import_module
  
      if sys.version_info < (3, 10):
          # 3.10 is when it was no longer provisional
          from importlib_metadata import distribution
      else:
          from importlib.metadata import distribution
  
      for ename, emod, eload in iter_entrypoints(group):
          info = {}
          infos[f"{ename}"] = info
          try:
              info["module"] = emod
              dist = distribution(emod.split(".", maxsplit=1)[0])
              info["distribution"] = f"{dist.name} {dist.version}"
              mod = import_module(emod, package="datalad")
              version = getattr(mod, "__version__", None)
              if version:
                  # no not clutter the report with no version
                  info["version"] = version
              elem = eload()
  
              doc, *_ = get_docstring_split(elem)
              if doc:
                  info["doc"] = textwrap.fill(
                      doc, 1000
                  ).strip()  # fill into a long line
  
              generation = getattr(elem, "__generation__", None)
              if generation:
                  info["generation"] = generation
  
              try:
                  info["version"] = elem.get_version(elem)
              except (AttributeError, NotImplementedError):
                  pass
  
              # TODO?: levels - file, dataset.
              # Too specific to each generation and might not be deducable
          except Exception as e:
              ce = CapturedException(e)
              info["load_error"] = ce.format_short()
              continue
      return infos
  
imports: import logging
  import os
  import os.path
  import sys
  import tempfile
  import textwrap
  from collections import defaultdict
  from functools import partial
  from datalad.dochelpers import get_docstring_split
  from datalad.interface.base import Interface, build_doc
  from datalad.utils import ensure_unicode, getpwd, unlink, Path
  from datalad.support.external_versions import external_versions
  from datalad.support.exceptions import CapturedException, CommandError, InvalidGitRepositoryError
  from datalad import __version__
label_desc: Use image node_id 11 for calling a global function with example usage: _describe_metadata_elements(group) and returns: infos