def METHOD_NAME(self, spline, matrix):
    segments = []
    pairs = zip(spline.bezier_points, spline.bezier_points[1:])
    if spline.use_cyclic_u:
        pairs = list(pairs) + [(spline.bezier_points[-1], spline.bezier_points[0])]
    points = []
    is_first = True
    for p1, p2 in pairs:
        c0 = p1.co
        c1 = p1.handle_right
        c2 = p2.handle_left
        c3 = p2.co
        if self.apply_matrix:
            c0, c1, c2, c3 = [tuple(matrix @ c) for c in [c0, c1, c2, c3]]
        else:
            c0, c1, c2, c3 = [tuple(c) for c in [c0, c1, c2, c3]]
        points.append([c0, c1, c2, c3])
        segment = SvCubicBezierCurve(c0, c1, c2, c3)
        segments.append(segment)
    if self.concat_segments:
        return points, concatenate_curves(segments)
    else:
        return points, segments