private void removeBadReturnType(Function function, List<Structure> badStructureDataTypes)
			throws InvalidInputException {

		DataType returnType = function.getReturnType();
		Structure baseDataType = extendedFlatAPI.getBaseStructureDataType(returnType);
		if (baseDataType != null && badStructureDataTypes.contains(baseDataType)) {
			PointerDataType ptrUndefined =
				extendedFlatAPI.createPointerToUndefinedDataType(returnType);
			if (ptrUndefined != null) {
				function.setReturnType(ptrUndefined, SourceType.ANALYSIS);
			}
		}
	}
Method to fix a bad return type if it is one of the bad structure data types on the given
list. The list was previously generated from functions that had incorrect FID signatures
placed on them that this script recognized and corrected.
@param function the given function
@param badStructureDataTypes a list of bad structure data types
@throws InvalidInputException if issue setting return type
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java