docs: private Collection<PartitionRanges> parsePartitionRanges(JSONObject jsData)
      {
          if (jsData != null) {
              try {
                  JSONObject partitionObj = jsData.getJSONObject("partitionRanges");
                  Iterator<String> partitionKey = partitionObj.keys();
  
                  ImmutableList.Builder<PartitionRanges> partitionRangesBuilder =
                      ImmutableList.builder();
  
                  while (partitionKey.hasNext()) {
                      String pidStr = partitionKey.next();
                      JSONObject rangeObj = partitionObj.getJSONObject(pidStr);
                      Iterator<String> rangeKey = rangeObj.keys();
  
                      ImmutableSortedMap.Builder<Integer, Integer> rangeBuilder =
                          ImmutableSortedMap.naturalOrder();
                      while (rangeKey.hasNext()) {
                          String rangeStartStr = rangeKey.next();
                          int rangeStart = Integer.parseInt(rangeStartStr);
                          int rangeEnd = rangeObj.getInt(rangeStartStr);
                          rangeBuilder.put(rangeStart, rangeEnd);
                      }
  
                      partitionRangesBuilder.add(new PartitionRanges(Integer.parseInt(pidStr),
                                                                     rangeBuilder.build()));
                  }
  
                  return partitionRangesBuilder.build();
              } catch (JSONException e) {
                  SNAP_LOG.warn("Failed to parse partition ranges", e);
              }
          }
  
          return null;
      }