List<Instruction> (@NotNull List<Instruction> subGraph) { final List<Instruction> result = new ArrayList<>(); for (Instruction instruction : subGraph) { if (instruction instanceof ReadWriteInstruction readWriteInstruction) { if (readWriteInstruction.getAccess().isWriteAccess()) { result.add(readWriteInstruction); } } } return result; }