PyAssignmentStatement (Project project, String assignmentText, PsiElement anchor) { LanguageLevel langLevel = ((PyFile) anchor.getContainingFile()).getLanguageLevel(); return PyElementGenerator.getInstance(project).createFromText(langLevel, PyAssignmentStatement.class, assignmentText); }