format
Formats the given list of errors into a multi-line diagnostic report.
If errors is empty, returns an empty string immediately. Otherwise, the report begins with a count header, followed by errors grouped by type, and ends with a fallback summary when applicable.
Return
A formatted, potentially ANSI-colored string suitable for terminal output.
Parameters
errors
The list of ConfigError instances to render.
config Name
A label for the configuration source, included in the header line. Defaults to "config".