code: def length(self):
          
          total_length = 0
          for location_a, location_b in zip(
                  self.locations[:-1], self.locations[1:]):
              total_length += Line(location_a, location_b).length
          return total_length
docs: Calculate total length of the polyline
  
          :return: total length in meters
          :rtype: float