public SymbolDependency getByName(String name, String dependencyType) {
        for (SymbolDependency dependency : dependencies) {
            if (dependency.getPackageName().equals(name) && dependency.getDependencyType().equals(dependencyType)) {
                return dependency;
            }
        }
        throw new IllegalArgumentException("Unknown dependency '" + name + "' of type '" + dependencyType + "'. "
                + "Known dependencies: " + dependencies);
    }
Gets the first found dependency by name and dependency type.

@param name Package name of the dependency to get.
@param dependencyType The dependency type of package to find.
@return Returns the dependency.
@throws IllegalArgumentException if the dependency cannot be found.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/DependencyTracker.java