void (PsiElement initStatement, @NotNull final PsiFile file) { initStatement = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(initStatement); if (initStatement instanceof PyAssignmentStatement) { final TemplateBuilder builder = TemplateBuilderFactory.getInstance().createTemplateBuilder(initStatement); if (builder != null) { final PyExpression assignedValue = ((PyAssignmentStatement)initStatement).getAssignedValue(); final PyExpression leftExpression = ((PyAssignmentStatement)initStatement).getLeftHandSideExpression(); if (assignedValue != null && leftExpression != null) { if (replaceInitializer) { builder.replaceElement(assignedValue, myInitializer); } else { builder.replaceElement(leftExpression.getLastChild(), myIdentifier); } PythonTemplateRunner.runTemplate(file, builder); } } } }