class_docstr: A filter pen to convert cubic bezier curves to quadratic b-splines
  using the FontTools PointPen protocol.
  
  Args:
      other_point_pen: another PointPen used to draw the transformed outline.
      max_err: maximum approximation error in font units. For optimal results,
          if you know the UPEM of the font, we recommend setting this to a
          value equal, or close to UPEM / 1000.
      reverse_direction: reverse the winding direction of all contours.
      stats: a dictionary counting the point numbers of quadratic segments.
      all_quadratic: if True (default), only quadratic b-splines are generated.
          if False, quadratic curves or cubic curves are generated depending
          on which one is more economical.
code: def _drawPoints(self, segments):
      pen = self.pen
      pen.beginPath()
      last_offcurves = []
      points_required = self.__points_required
      for i, (segment_type, points) in enumerate(segments):
          if segment_type in points_required:
              n, op = points_required[segment_type]
              assert op(len(points), n), (
                  f"illegal {segment_type!r} segment point count: "
                  f"expected {n}, got {len(points)}"
              )
              offcurves = points[:-1]
              if i == 0:
                  # any off-curve points preceding the first on-curve
                  # will be appended at the end of the contour
                  last_offcurves = offcurves
              else:
                  for pt, smooth, name, kwargs in offcurves:
                      pen.addPoint(pt, None, smooth, name, **kwargs)
              pt, smooth, name, kwargs = points[-1]
              if pt is None:
                  assert segment_type == "qcurve"
                  # special quadratic contour with no on-curve points:
                  # we need to skip the "None" point. See also the Pen
                  # protocol's qCurveTo() method and fontTools.pens.basePen
                  pass
              else:
                  pen.addPoint(pt, segment_type, smooth, name, **kwargs)
          else:
              raise AssertionError(
                  "unexpected segment type: %r" % segment_type
              )
      for pt, smooth, name, kwargs in last_offcurves:
          pen.addPoint(pt, None, smooth, name, **kwargs)
      pen.endPath()
  
imports: import operator
  from fontTools.cu2qu import curve_to_quadratic, curves_to_quadratic
  from fontTools.pens.basePen import decomposeSuperBezierSegment
  from fontTools.pens.filterPen import FilterPen
  from fontTools.pens.reverseContourPen import ReverseContourPen
  from fontTools.pens.pointPen import BasePointToSegmentPen
  from fontTools.pens.pointPen import ReverseContourPointPen
label_desc: Use image node_id 4 for calling the Cu2QuPointPen obj's underlying member method code with example usage: obj._drawPoints(segments) without return types