public static Map<String, Map<String, SymbolDependency>> gatherDependencies(
            Stream<SymbolDependency> symbolStream
    ) {
        return gatherDependencies(symbolStream, (a, b) -> {
            throw new CodegenException(String.format(
                    "Found a conflicting `%s` dependency for `%s`: `%s` conflicts with `%s`",
                    a.getDependencyType(),
                    a.getPackageName(),
                    a.getVersion(),
                    b.getVersion()));
        });
    }
Gets a mapping of all dependencies used by the provided symbols.

<p>Given a stream of symbols, the dependencies of the symbol are gathered into
a map of the dependencyType to a map of a package name to package version.

<p>By default, when two versions conflict, an exception is thrown. In the
case the a conflict is possible or it is necessary to detect incompatibilities,
use {@link #gatherDependencies(Stream, BinaryOperator)} and provide a
custom version merge function.

@param symbolStream Stream of symbols to compute from.
@return Returns a map of dependency types to a map of package to version.
@throws CodegenException when two package versions conflict.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/SymbolDependency.java