private Structure findBadReturnType(Function function, Namespace namespace) {

		DataType returnType = function.getReturnType();
		if (!returnType.getName().equals(namespace.getName()) &&
			extendedFlatAPI.isPointerToEmptyStructure(returnType)) {
			Pointer ptr = (Pointer) returnType;
			Structure structure = (Structure) ptr.getDataType();

			return structure;

		}
		return null;
	}
Method to find incorrect empty structure return type
@param function the function to check
@param namespace the parent namespace of the function
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java