public Bounds getBounds(List<Section> sections, int startSectIdx, int endSectIdx) {
    if (sections == null) {
      return null;
    }
    Bounds bounds = new Bounds();
    bounds.setMinX(sections.get(startSectIdx).getPoints().get(0).getX());
    bounds.setMaxX(
        sections
            .get(endSectIdx)
            .getPoints()
            .get(sections.get(endSectIdx).getPoints().size() - 1)
            .getX());
    for (int i = startSectIdx; i < endSectIdx; i++) {
      Stream<Double> yList = sections.get(i).getPoints().stream().map(Point::getY);
      double localMinY =
          sections.get(i).getPoints().stream()
              .map(Point::getY)
              .min(Double::compare)
              .orElseGet(() -> (double) Long.MAX_VALUE);
      double localMaxY =
          sections.get(i).getPoints().stream()
              .map(Point::getY)
              .max(Double::compare)
              .orElseGet(() -> (double) Long.MAX_VALUE);
      if (localMinY < bounds.getMinY()) {
        bounds.setMinY(localMinY);
      }
      if (localMaxY > bounds.getMaxY()) {
        bounds.setMaxY(localMaxY);
      }
    }
    return bounds;
  }
Given a list of tangents it divides the list of tangents in a list of sections. Each section
shares the same tangent signs (a section could be an increasing curve or a decreasing curve,
but not both)

@return Array of sections.
library-udf/src/main/java/org/apache/iotdb/library/match/PatternExecutor.java