original_docstring: 
      Consecutive segments shouldn't have the same angle.
  
      Data structure:
  
          [
              point,
              ...
          ]
      
docstring: Consecutive segments shouldn't have the same angle.
  Data structure.
  
  
docstring_tokens: Consecutive segments shouldn ' t have the same angle . Data structure .
code: def testForUnnecessaryPoints(contour):
      """
      Consecutive segments shouldn't have the same angle.
  
      Data structure:
  
          [
              point,
              ...
          ]
      """
      contour = wrapContour(contour)
      unnecessaryPoints = []
      for segmentIndex, segment in enumerate(contour):
          if segment.type == "line":
              prevSegment = contour[segmentIndex - 1]
              nextSegment = contour[(segmentIndex + 1) % len(contour)]
              if nextSegment.type == "line":
                  thisAngle = calculateAngle(prevSegment.onCurve, segment.onCurve)
                  nextAngle = calculateAngle(segment.onCurve, nextSegment.onCurve)
                  if thisAngle == nextAngle:
                      unnecessaryPoints.append(unwrapPoint(segment.onCurve))
      return unnecessaryPoints
code_tokens: def testForUnnecessaryPoints ( contour ) : contour = wrapContour ( contour ) unnecessaryPoints = [ ] for segmentIndex , segment in enumerate ( contour ) : if segment . type == "line" : prevSegment = contour [ segmentIndex - 1 ] nextSegment = contour [ ( segmentIndex + 1 ) % len ( contour ) ] if nextSegment . type == "line" : thisAngle = calculateAngle ( prevSegment . onCurve , segment . onCurve ) nextAngle = calculateAngle ( segment . onCurve , nextSegment . onCurve ) if thisAngle == nextAngle : unnecessaryPoints . append ( unwrapPoint ( segment . onCurve ) ) return unnecessaryPoints
short_docstring: Consecutive segments shouldn't have the same angle.
short_docstring_tokens: Consecutive segments shouldn ' t have the same angle .
comment: """
      Consecutive segments shouldn't have the same angle.
  
      Data structure:
  
          [
              point,
              ...
          ]
      """