public static String replaceLastSuffix(String s, String separator, String newElementName) {

    Pair<String, String> quotes = null;
    if (PyStringLiteralCoreUtil.isQuoted(s)) {
      quotes = PyStringLiteralCoreUtil.getQuotes(s);
      s = PyStringLiteralCoreUtil.stripQuotesAroundValue(s);
    }

    s = removeLastSuffix(s, separator);
    if (s.length() > 0) {
      s += separator;
    }
    s += newElementName;
    if (quotes != null) {
      s = quotes.first + s + quotes.second;
    }
    return s;
  }
public static String replaceLastSuffix(String s, String separator, String newElementName)