code: public static boolean verifyRecordMatchesInput(List<Long> segmentsToSeal, List<Map.Entry<Double, Double>> newRanges,
                                                     boolean isManualScale, EpochTransitionRecord record) {
          // verify that supplied new range matches new range in the record
          boolean newRangeMatch = newRanges.stream().allMatch(x ->
                  record.getNewSegmentsWithRange().values().stream()
                          .anyMatch(y -> y.getKey().equals(x.getKey())
                                  && y.getValue().equals(x.getValue())));
  
          if (newRangeMatch) {
              final Set<Integer> segmentNumbersToSeal = isManualScale ? 
                      segmentsToSeal.stream().map(StreamSegmentNameUtils::getSegmentNumber).collect(Collectors.toSet()) :
                      null;
              return segmentsToSeal.stream().allMatch(segmentId -> {
                  if (isManualScale) {
                      // compare segmentNumbers
                      return segmentNumbersToSeal.contains(StreamSegmentNameUtils.getSegmentNumber(segmentId));
                  } else {
                      // compare segmentIds
                      return record.getSegmentsToSeal().contains(segmentId);
                  }
              });
          }
          return false;
      }
docs: Method to verify if supplied epoch transition record matches the supplied input which includes segments to seal,
  new ranges to create.
  For manual scale, it will verify that segments to seal match and epoch transition record share the same segment
  number.
  
  @param segmentsToSeal list of segments to seal
  @param newRanges list of new ranges to create
  @param isManualScale if it is manual scale
  @param record epoch transition record
  @return true if record matches supplied input, false otherwise.