static boolean hasEnoughUndefinedsOfAnyLengthAtOffset(Structure structure, int offset,
			int length, TaskMonitor monitor) throws CancelledException {

		if (structure.isPackingEnabled()) {
			throw new IllegalArgumentException(
				"Packed structures are not supported by this method");
		}

		int endOfRange = offset + length;

		if (offset < 0 || length <= 0 || structure.getLength() < endOfRange) {
			return false;
		}

		while (offset < endOfRange) {

			monitor.checkCancelled();

			DataTypeComponent component = structure.getComponentContaining(offset);

			DataType dataType = component.getDataType();

			if (!Undefined.isUndefined(dataType)) {
				return false;
			}

			offset = component.getOffset() + component.getLength();

		}

		return true;
	}
Method to determine if there are at least the given length of undefined (any size) components 
at the given offset in the given structure. This is only valid for non-packed structures.
@param structure the given structure
@param offset the given offset
@param length the total length of undefined components to check for starting at given offset
@param monitor task monitor
@return true if there are at least total length of undefined components at the given offset in the given structure
@throws CancelledException if cancelled
@throws IllegalArgumentException if a packed structure is passed in
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/EditStructureUtils.java