docs: static final public LocalRateOptions parseRateOptions(boolean rate, String spec) {
      if (!rate || spec.length() < 6) {
        return new LocalRateOptions();
      }
  
      String[] parts = spec.split(spec.substring(5, spec.length() - 1), ',');
      if (parts.length < 1 || parts.length > 3) {
        return new LocalRateOptions();
      }
  
      try {
        LocalRateOptions options = new LocalRateOptions();
        options.is_counter = parts[0].endsWith("counter");
        options.counter_max = (parts.length >= 2 && parts[1].length() > 0 ? Long
            .parseLong(parts[1]) : Long.MAX_VALUE);
        options.reset_value = (parts.length >= 3 && parts[2].length() > 0 ? Long
            .parseLong(parts[2]) : 0);
        return options;
      } catch (NumberFormatException e) {
        return new LocalRateOptions();
      }
    }