HighlightUsagesHandlerBase (@NotNull Editor editor, @NotNull PsiFile file, @NotNull PsiElement target) { final PyReturnStatement returnStatement = PsiTreeUtil.getParentOfType(target, PyReturnStatement.class); if (returnStatement != null) { final PyExpression returnExpr = returnStatement.getExpression(); if (returnExpr == null || !PsiTreeUtil.isAncestor(returnExpr, target, false)) { return new PyHighlightExitPointsHandler(editor, file, target); } } return null; }