@Override
	public LoadSpec choose(LoaderMap loaderMap) {

		// Use the highest priority loader (it will be the first one)
		Loader loader = loaderMap.keySet().stream().findFirst().orElse(null);
		if (loader == null) {
			return null;
		}

		// Try to use a known LoadSpec that matches the desired language/compiler spec
		Collection<LoadSpec> loadSpecs = loaderMap.get(loader);
		for (LoadSpec loadSpec : loadSpecs) {
			// single loadSpec with null LCS pair may exist when no opinion was found
			LanguageCompilerSpecPair lcsPair = loadSpec.getLanguageCompilerSpec();
			if (lcsPair != null && lcsPair.languageID.equals(languageID) &&
				(compilerSpecID == null || lcsPair.compilerSpecID.equals(compilerSpecID))) {
				return loadSpec;
			}
		}

		// The desired language/compiler spec is not a defined LoadSpec, so we'll create a custom 
		// one. This could result in crazy results/analysis, but the point of this chooser is to do 
		// what we are told.
		LoadSpec anyLoadSpec = CollectionUtils.any(loadSpecs);
		LanguageCompilerSpecPair customLcsPair =
			new LanguageCompilerSpecPair(languageID, compilerSpecID);
		LoadSpec customLoadSpec =
			new LoadSpec(loader, anyLoadSpec.getDesiredImageBase(), customLcsPair, false);
		Msg.warn(this, "Using unknown opinion: " + loader.getName() + ", " + customLcsPair);
		return customLoadSpec;
	}
Creates a new {@link LcsHintLoadSpecChooser}.
<p>
NOTE: It is assumed that the given {@link Language} is valid and it supports the given 
{@link CompilerSpec}.

@param language The {@link Language} to use (should not be null)
@param compilerSpec The {@link CompilerSpec} to use (f null default compiler spec will be used)
Ghidra/Features/Base/src/main/java/ghidra/app/util/importer/LcsHintLoadSpecChooser.java