code: def from_gpx(gpx_segment):
          
          points = []
          for point in gpx_segment.points:
              points.append(Point.from_gpx(point))
          return Segment(points)
docs: Creates a segment from a GPX format.
  
          No preprocessing is done.
  
          Arguments:
              gpx_segment (:obj:`gpxpy.GPXTrackSegment`)
          Return:
              :obj:`Segment`