private Namespace createNamespace(String name, SymbolType symbolType, Address address,
			Namespace toParentNamespace, SourceType source)
			throws DuplicateNameException, InvalidInputException {

		if (symbolType == SymbolType.FUNCTION) { // function names don't have to be unique
			return (Namespace) createSymbol(name, symbolType, address, toParentNamespace, source);
		}

		// Need to create a unique named namespace that is equivalent to original.
		for (int i = 0; i < Integer.MAX_VALUE; i++) {
			String uniqueName = (i == 0) ? name : name + ProgramMerge.SYMBOL_CONFLICT_SUFFIX + i;
			Namespace ns = toSymbolTable.getNamespace(uniqueName, toParentNamespace);
			if (ns != null) {
				Symbol s = ns.getSymbol();
				if (!s.getAddress().equals(address) || !s.getSymbolType().equals(symbolType)) {
					continue; // Not the right one, so go to next conflict name.
				}
				// Found the equivalent namespace so return it.
				return ns;
			}
			// Create it, since nothing with this conflict name.
			Symbol uniqueSymbol =
				createSymbol(uniqueName, symbolType, address, toParentNamespace, source);
			if (uniqueSymbol != null) {
				Object obj = uniqueSymbol.getObject();
				if (obj instanceof Namespace) {
					return (Namespace) obj;
				}
			}
			break; // Otherwise throw exception
		}
		throw new DuplicateNameException("Couldn't create namespace '" + name + "' in namespace '" +
			toParentNamespace.getName(true) + "'.");
	}
Get/create a uniquely named namespace. If the namespace's name can't
be created because of a name conflict, it will be given a new conflict name.
@param name the desired name for the namespace
@param symbolType the symbol type for this namespace
@param address the address for this namespace
This address should be derived from the "to" program.
@param toParentNamespace the parent of this namespace that is in the "to" program.
@param source the source of this symbol
@return an equivalent namespace that exists or was created in the "to" program.
@throws DuplicateNameException if the namespace couldn't be created
because of an unresolvable name conflict.
@throws InvalidInputException if the namespace couldn't be created
because the specified name is invalid in the "to" program.
Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolMerge.java