private static void rename(ProgramModule module) {
		try {
			String numKidsPrefix = "   [";
			String currentName = module.getName();
			int prefix = currentName.indexOf(numKidsPrefix);
			String baseName = (prefix < 0) ? currentName : currentName.substring(0, prefix);
			module.setName(baseName + numKidsPrefix + module.getNumChildren() + "]");
		}
		catch (DuplicateNameException e) {
			// not sure why we are squashing this?...better description needed
		}
	}
Method cleanTree. Removes all empty fragments and empty modules

@param module the root branch to be cleaned. Can be branch or entire tree
@throws NotEmptyException if attempting to remove a module or fragment that is not empty
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/module/AbstractModularizationCmd.java