code: def resample(self, section_length):
          
  
          if len(self.points) < 2:
              return Line(self.points)
  
          resampled_points = []
  
          # 1. Resample the first section. 2. Loop over the remaining points
          # in the line and resample the remaining sections.
          # 3. Extend the list with the resampled points, except the first one
          # (because it's already contained in the previous set of
          # resampled points).
  
          resampled_points.extend(
              self.points[0].equally_spaced_points(self.points[1],
                                                   section_length)
          )
  
          # Skip the first point, it's already resampled
          for i in range(2, len(self.points)):
              points = resampled_points[-1].equally_spaced_points(
                  self.points[i], section_length
              )
  
              resampled_points.extend(points[1:])
  
          return Line(resampled_points)
docs: Resample this line into sections.
  
          The first point in the resampled line corresponds
          to the first point in the original line.
  
          Starting from the first point in the original line, a line
          segment is defined as the line connecting the last point in the
          resampled line and the next point in the original line.
          The line segment is then split into sections of length equal to
          ``section_length``. The resampled line is obtained
          by concatenating all sections.
  
          The number of sections in a line segment is calculated as follows:
          ``round(segment_length / section_length)``.
  
          Note that the resulting line has a length that is an exact multiple of
          ``section_length``, therefore its length is in general smaller
          or greater (depending on the rounding) than the length
          of the original line.
  
          For a straight line, the difference between the resulting length
          and the original length is at maximum half of the ``section_length``.
          For a curved line, the difference my be larger,
          because of corners getting cut.
  
          :param section_length:
              The length of the section, in km.
          :type section_length:
              float
          :returns:
              A new line resampled into sections based on the given length.
          :rtype:
              An instance of :class:`Line`