<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _removeSegment(self, segment, preserveCurve, **kwargs):
 """ segment will be a valid segment index. preserveCurve will be a boolean. Subclasses may override this method. """

        segment = self.segments[segment]
        for point in segment.points:
            self.removePoint(point, preserveCurve)