PyKeywordArgument (LanguageLevel languageLevel, String keyword, String value) { PyCallExpression callExpression = (PyCallExpression)createExpressionFromText(languageLevel, "foo(" + keyword + "=" + value + ")"); return (PyKeywordArgument)callExpression.getArguments()[0]; }