@Override
  protected void invoke(@NotNull ActionContext context, @NotNull PyAssignmentStatement element, @NotNull ModPsiUpdater updater) {
    final PyExpression assignedValue = element.getAssignedValue();
    if (assignedValue instanceof PyConditionalExpression expression) {
      final PyExpression condition = expression.getCondition();
      final PyExpression falsePart = expression.getFalsePart();
      if (condition != null && falsePart != null) {
        final String truePartText = expression.getTruePart().getText();
        final PyExpression leftHandSideExpression = element.getLeftHandSideExpression();
        if (leftHandSideExpression != null) {
          final String targetText = leftHandSideExpression.getText();
          final PyElementGenerator elementGenerator = PyElementGenerator.getInstance(context.project());
          final String text = "if " + condition.getText() + ":\n\t" + targetText + " = " + truePartText
                              + "\nelse:\n\t" + targetText + " = " + falsePart.getText();
          final PyIfStatement ifStatement =
            elementGenerator.createFromText(LanguageLevel.forElement(expression), PyIfStatement.class, text);
          element.replace(ifStatement);
        }
      }
    }
  }
@Override
  protected void invoke(@NotNull ActionContext context, @NotNull PyAssignmentStatement element, @NotNull ModPsiUpdater updater)