List<Instruction> (ControlFlow controlFlow, String varName, PsiElement anchor, boolean acceptTypeAssertions, boolean acceptImplicitImports) { final Instruction[] instructions = controlFlow.getInstructions(); final PyAugAssignmentStatement augAssignment = PyAugAssignmentStatementNavigator.getStatementByTarget(anchor); if (augAssignment != null) { anchor = augAssignment; } int instr = ControlFlowUtil.findInstructionNumberByElement(instructions, anchor); if (instr < 0) { return Collections.emptyList(); } if (anchor instanceof PyTargetExpression) { Collection<Instruction> pred = instructions[instr].allPred(); if (!pred.isEmpty()) { instr = pred.iterator().next().num(); } } final Collection<Instruction> result = getLatestDefs(varName, instructions, instr, acceptTypeAssertions, acceptImplicitImports); return new ArrayList<>(result); }