code: def setStartSegment(self, segment):
          
          segments = self.segments
          if not isinstance(segment, int):
              segmentIndex = segments.index(segment)
          else:
              segmentIndex = segment
          if len(self.segments) < 2:
              return
          if segmentIndex == 0:
              return
          if segmentIndex >= len(segments):
              raise ValueError(("The contour does not contain a segment "
                                "at index %d" % segmentIndex))
          self._setStartSegment(segmentIndex)
docs: Set the first segment on the contour.
          segment can be a segment object or an index.