code: def slice(self, start, end):
          
  
          reverse = False
          if start > end:
              temp = start
              start = end
              end = temp
              reverse = True
  
          seg = self.copy()
          seg.points = seg.points[start:end+1]
          if reverse:
              seg.points = list(reversed(seg.points))
  
          return seg
docs: Creates a copy of the current segment between indexes. If end > start,
              points are reverted
  
          Args:
              start (int): Start index
              end (int): End index
          Returns:
              :obj:`Segment`