private void addYieldExpression() {
    extend(CompletionType.BASIC,
           psiElement()
             .withLanguage(PythonLanguage.getInstance())
             .andOr(psiElement()
                      .inside(false, psiElement(PyAssignmentStatement.class), psiElement(PyTargetExpression.class))
                      .afterLeaf(psiElement().withElementType(PyTokenTypes.EQ)),
                    psiElement()
                      .inside(false, psiElement(PyAugAssignmentStatement.class), psiElement(PyTargetExpression.class))
                      .afterLeaf(psiElement().withElementType(PyTokenTypes.AUG_ASSIGN_OPERATIONS)),
                    psiElement()
                      .inside(true, psiElement(PyParenthesizedExpression.class)))
                      .andNot(IN_STRING_LITERAL)
                      .andNot(IN_COMMENT),
           new PyKeywordCompletionProvider(PyNames.YIELD));
  }
private void addYieldExpression()