@Override
  public void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) {
    final PyNamedParameter param = PsiTreeUtil.getParentOfType(element, PyNamedParameter.class);
    final PyFunction function = PsiTreeUtil.getParentOfType(element, PyFunction.class);
    assert param != null;
    final String defName = param.getName();
    if (function != null && defName != null) {
      final PyElementGenerator generator = PyElementGenerator.getInstance(project);
      final LanguageLevel languageLevel = LanguageLevel.forElement(function);
      
      final PyNamedParameter newParam = generator.createParameter(defName, PyNames.NONE, null, languageLevel);
      param.replace(newParam);

      final String conditionalText = "if " + defName + " is None:" +
                                     "\n\t" + defName + " = " + element.getText();
      final PyIfStatement conditionalAssignment = generator.createFromText(languageLevel, PyIfStatement.class, conditionalText);
      PyPsiRefactoringUtil.addElementToStatementList(conditionalAssignment, function.getStatementList(), true);
    }
  }
@Override
  public void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater)