List<PsiElement> (@NotNull PsiElement context, @NotNull Document document, int offset) { PyExpressionStatement exprStatement = PsiTreeUtil.getNonStrictParentOfType(context, PyExpressionStatement.class); PyExpression expression = exprStatement != null ? exprStatement.getExpression() : null; return ContainerUtil.createMaybeSingletonList(expression); }