@Override
  public void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) {
    PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project);
    final PyAssignmentStatement assignmentStatement = as(element, PyAssignmentStatement.class);
    if (assignmentStatement == null) return;
    final PyExpression assignedValue = assignmentStatement.getAssignedValue();
    if (assignedValue == null) return;

    List<PyExpressionStatement> appendCalls = PyListCreationInspection.collectSubsequentListAppendCalls(assignmentStatement);
    final List<PyExpression> items = buildLiteralItems(assignedValue, appendCalls);
    appendCalls.forEach(PyExpressionStatement::delete);

    final String text = "[" + StringUtil.join(items, PyExpression::getText, ", ") + "]";
    assignedValue.replace(elementGenerator.createExpressionFromText(LanguageLevel.forElement(assignedValue), text));
  }
@Override
  public void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater)