Collection<PsiElement> (final ControlFlow flow) { final List<PsiElement> statements = new ArrayList<>(); final Instruction[] instructions = flow.getInstructions(); for (Instruction instruction : instructions[instructions.length - 1].allPred()){ final PsiElement element = instruction.getElement(); if (element == null){ continue; } final PsiElement statement = PyPsiUtils.getStatement(element); if (statement != null){ statements.add(statement); } } return statements; }