code: public static boolean hasMatchingLabels(FlatRow row) {
      int inLabelCount = 0;
      int outLabelCount = 0;
      for (FlatRow.Cell cell : row.getCells()) {
        for (String label : cell.getLabels()) {
          // TODO(kevinsi4508): Make sure {@code label} is a {@link WhileMatchFilter} label.
          // TODO(kevinsi4508): Handle multiple {@link WhileMatchFilter} labels.
          if (label.endsWith(WHILE_MATCH_FILTER_IN_LABEL_SUFFIX)) {
            inLabelCount++;
          } else if (label.endsWith(WHILE_MATCH_FILTER_OUT_LABEL_SUFFIX)) {
            outLabelCount++;
          }
        }
      }
  
      // Checks if there is mismatching {@link WhileMatchFilter} label.
      if (inLabelCount != outLabelCount) {
        return false;
      }
  
      return true;
    }
docs: Returns {@code true} iff there are matching {@link WhileMatchFilter} labels or no {@link
  WhileMatchFilter} labels.
  @param row a {@link FlatRow} object.
  @return a boolean value.