public List<Point> sectionEndSubpartPoints(Section section, double width) {
    List<Point> points = new ArrayList<>();
    double endX = section.getPoints().get(section.getPoints().size() - 1).getX();
    for (int pi = section.getPoints().size() - 1; pi >= 0; pi--) {
      points.add(0, section.getPoints().get(pi));
      if (endX - section.getPoints().get(pi).getX() >= width) {
        break;
      }
    }
    return points;
  }
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