private static boolean isIncompleteExpressionWithBrackets(@NotNull PsiElement elem) {
    if (elem instanceof PyAstSequenceExpression || elem instanceof PyAstComprehensionElement || elem instanceof PyAstParenthesizedExpression) {
      return PyTokenTypes.OPEN_BRACES.contains(elem.getFirstChild().getNode().getElementType()) &&
             !PyTokenTypes.CLOSE_BRACES.contains(elem.getLastChild().getNode().getElementType());
    }
    return false;
  }
private static boolean isIncompleteExpressionWithBrackets(@NotNull PsiElement elem)