private ExternalLocation getExtLocation(Namespace library, String extLabel, Address extAddr,
			boolean reuseExisting) throws InvalidInputException {

		// Name match will also consider original import name if library is either null
		// or a Library, otherwise only a specific namespaced name match will be considered.
		ExternalLocation match =
			findMatchingLocationByName(library, extLabel, extAddr, reuseExisting);
		if (match != null) {
			return match;
		}

		if (extLabel == null) { // assume extAddr is not null (already checked)
			return findMatchingLocationByAddress(extAddr, reuseExisting);
		}

		return null;
	}
Get the external location which best matches the specified parameters.
Preference is given to extLabel over extAddr
@param library the library namespace containing this external location.
@param extLabel the name of the external location. Can be null.
@param extAddr the address of function in the external program.  Can be null
@return the best matching ExternalLocation or null.
@throws InvalidInputException if the extLabel name contains illegal characters (i.e. space)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/external/ExternalManagerDB.java