PyNamedParameter (@NotNull String name, @Nullable String defaultValue, @Nullable String annotation, @NotNull LanguageLevel languageLevel) { String parameterText = name; if (annotation != null) { parameterText += ": " + annotation; } if (defaultValue != null) { parameterText += " = " + defaultValue; } return createFromText(languageLevel, PyNamedParameter.class, "def f(" + parameterText + "): pass", PATH_PARAMETER); }