void (final ScopeOwner owner) { final Instruction[] instructions = ControlFlowCache.getControlFlow(owner).getInstructions(); for (int i = 0; i < instructions.length; i++) { final Instruction instruction = instructions[i]; if (instruction instanceof ReadWriteInstruction readWriteInstruction) { final ReadWriteInstruction.ACCESS access = readWriteInstruction.getAccess(); if (!access.isReadAccess()) { continue; } final String name = readWriteInstruction.getName(); if (name == null) { continue; } final PsiElement element = instruction.getElement(); // Ignore elements out of scope if (element == null || !PsiTreeUtil.isAncestor(owner, element, false)) { continue; } final int startInstruction; if (access.isWriteAccess()) { final PyAugAssignmentStatement augAssignmentStatement = PyAugAssignmentStatementNavigator.getStatementByTarget(element); startInstruction = ControlFlowUtil.findInstructionNumberByElement(instructions, augAssignmentStatement); } else { startInstruction = i; } analyzeReadsInScope(name, owner, instructions, startInstruction, PyUtil.as(element, PyReferenceExpression.class)); } } }