List<PsiElement> (@NotNull PsiElement context, @NotNull Document document, int offset) { PsiElement elementAtCaret = PsiUtilCore.getElementAtOffset(context.getContainingFile(), offset - 1); if (elementAtCaret instanceof PsiComment) { return Collections.emptyList(); } return ContainerUtil.createMaybeSingletonList(PsiTreeUtil.getParentOfType(elementAtCaret, PyStatement.class)); }