public static Symbol getLabelOrFunctionSymbol(Program program, String symbolName,
			Consumer<String> errorConsumer) {
		List<Symbol> symbols = program.getSymbolTable().getLabelOrFunctionSymbols(symbolName, null);
		if (symbols.size() == 1) {
			return symbols.get(0);
		}

		if (symbols.size() > 1) {
			errorConsumer.accept("Multiple " + symbolName + " symbols found!");
		}

		return null;
	}
Returns the unique global label or function symbol with the given name. Also, logs if there
is more than one symbol with that name.

@param program the program to search.
@param symbolName the name of the global label or function symbol to search.
@param errorConsumer the object to use for reporting errors via it's accept() method.
@return symbol if a unique label/function symbol with name is found or null
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/SymbolUtilities.java