PyExpression (@Nullable PsiElement resolveResult) { if (resolveResult == null) return null; final PyKeywordArgument argument = as(resolveResult, PyKeywordArgument.class); if (argument != null) { return argument.getValueExpression(); } final PyKeyValueExpression parent = as(resolveResult.getParent(), PyKeyValueExpression.class); if (parent != null && parent.getKey() == resolveResult) { return parent.getValue(); } return as(resolveResult, PyExpression.class); }