@Override
  public void doApply(@NotNull Editor editor, @NotNull PySmartEnterProcessor processor, @NotNull PyArgumentList arguments) throws IncorrectOperationException {
    final PsiElement rBrace = PyPsiUtils.getChildByFilter(arguments, PyTokenTypes.CLOSE_BRACES, 0);
    if (arguments.getParent() instanceof PyClass || arguments.getParent() instanceof PyDecorator) {
      final PsiElement lBrace = PyPsiUtils.getChildByFilter(arguments, PyTokenTypes.OPEN_BRACES, 0);
      if (lBrace != null && rBrace == null) {
        final Document document = editor.getDocument();
        document.insertString(arguments.getTextRange().getEndOffset(), ")");
      }
    }
    else {
      if (rBrace == null) {
        final Document document = editor.getDocument();
        document.insertString(arguments.getTextRange().getEndOffset(), ")");
      }
    }
  }
@Override
  public void doApply(@NotNull Editor editor, @NotNull PySmartEnterProcessor processor, @NotNull PyArgumentList arguments)