void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement psiElement = descriptor.getPsiElement(); if (psiElement == null) return; var languageLevel = LanguageLevel.forElement(psiElement); PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project); if (languageLevel.isAtLeast(LanguageLevel.PYTHON311)) { String starred = "*" + psiElement.getText(); PyExpressionStatement expressionStatement = elementGenerator.createFromText(languageLevel, PyExpressionStatement.class, starred); PyExpression newElement = expressionStatement.getExpression(); psiElement.replace(newElement); } else { replaceToTypingExtensionsUnpack(psiElement, psiElement, psiElement.getContainingFile(), project); } }