Inspect optional-dependency install status for the running distribution.
Reads Requires-Dist metadata to report which packages declared under
[project.optional-dependencies] are installed, and renders that status
in either plain text (for stdout) or markdown (for rich UI contexts).
Return installed optional dependencies grouped by extra.
Reads Requires-Dist metadata from the named distribution, groups the
entries gated by extra == "..." markers under their extra name, and
resolves each package's installed version via importlib.metadata.
Packages that are not installed are omitted; extras whose entire
package list is absent are dropped.
Composite meta-extras that only bundle other extras (see
_COMPOSITE_EXTRAS) and self-references to the distribution itself
are skipped — their components already appear under their own extras.
Render an ExtrasStatus mapping as column-aligned plain text.
Suitable for stdout in non-interactive contexts (e.g. the --version
CLI flag) where a markdown renderer is unavailable.
Render an ExtrasStatus mapping as a markdown fragment.