public List<OffsetPcodeOpPair> removePcodeOpsNotInFunction(Function function,
			List<OffsetPcodeOpPair> pcodeOps) throws CancelledException {

		Iterator<OffsetPcodeOpPair> pcodeOpsIterator = pcodeOps.iterator();
		while (pcodeOpsIterator.hasNext()) {
			monitor.checkCancelled();
			OffsetPcodeOpPair offsetPcodeOpPair = pcodeOpsIterator.next();
			PcodeOp pcodeOp = offsetPcodeOpPair.getPcodeOp();
			Address pcodeOpAddress = pcodeOp.getSeqnum().getTarget();
			if (!function.getBody().contains(pcodeOpAddress)) {
				pcodeOpsIterator.remove();
			}
		}
		return pcodeOps;
	}
Method to return subList of offset/pcodeOp pairs from the given list that are contained in the current function
@param function The given function
@param pcodeOps The list of pcodeOps to filter
@return List of pcodeOps from given list that are contained in given function
@throws CancelledException when cancelled
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java