@Override
	public int getDelaySlotDepth(InstructionContext context) {
		int delayInstrCnt = 0;
		int byteCnt = 0;
		int offset = getLength();
		if (delaySlotByteCnt == 1) {
			return 1;
		}
		try {
			ReadOnlyProcessorContext roContext =
				new ReadOnlyProcessorContext(context.getProcessorContext());
			while (byteCnt < delaySlotByteCnt) {
				MemBuffer delaymem = new WrappedMemBuffer(context.getMemBuffer(), offset);
				SleighInstructionPrototype proto =
					(SleighInstructionPrototype) language.parse(delaymem, roContext, true);
				int len = proto.getLength();
				offset += len;
				byteCnt += len;
				++delayInstrCnt;
			}
		}
		catch (Exception e) {
			// Treat bad instructions as not part of delay slot
		}
		return delayInstrCnt;
	}
Walk the Constructor tree gathering ConstructStates which are flow destinations
(flowStateList) flowFlags and delayslot directives
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/SleighInstructionPrototype.java