@NotNull
  private String updateDocString() {
    DocStringUpdater updater = null;
    if (myDocStringFormat == DocStringFormat.EPYTEXT || myDocStringFormat == DocStringFormat.REST) {
      final String prefix = myDocStringFormat == DocStringFormat.EPYTEXT ? "@" : ":";
      // noinspection ConstantConditions
      updater = new TagBasedDocStringUpdater((TagBasedDocString)getStructuredDocString(), prefix, myDocStringIndent);
    }
    else if (myDocStringFormat == DocStringFormat.GOOGLE) {
      //noinspection ConstantConditions
      updater = GoogleCodeStyleDocStringUpdater.forSettings((GoogleCodeStyleDocString)getStructuredDocString(),
                                                            myDocStringIndent,
                                                            mySettingsAnchor.getContainingFile());
    }
    else if (myDocStringFormat == DocStringFormat.NUMPY) {
      //noinspection ConstantConditions
      updater = new NumpyDocStringUpdater((SectionBasedDocString)getStructuredDocString(), myDocStringIndent);
    }
    // plain docstring - do nothing
    else if (myDocStringText != null){
      return myDocStringText;
    }
    if (updater != null) {
      for (DocstringParam param : myAddedParams) {
        if (param.isReturnValue()) {
          updater.addReturnValue(param.getType());
        }
        else {
          updater.addParameter(param.getName(), param.getType());
        }
      }
      for (DocstringParam param : myRemovedParams) {
        if (!param.isReturnValue()) {
          updater.removeParameter(param.getName());
        }
      }
      return updater.getDocStringText();
    }
    return createEmptyFallbackDocString();
  }
@NotNull
  private String updateDocString()