code: def bounds(self, thr=0):
          
          min_lat = float("inf")
          min_lon = float("inf")
          max_lat = -float("inf")
          max_lon = -float("inf")
          for segment in self.segments:
              milat, milon, malat, malon = segment.bounds(thr=thr)
              min_lat = min(milat, min_lat)
              min_lon = min(milon, min_lon)
              max_lat = max(malat, max_lat)
              max_lon = max(malon, max_lon)
          return min_lat, min_lon, max_lat, max_lon
docs: Gets the bounds of this segment
  
          Returns:
              (float, float, float, float): Bounds, with min latitude, min longitude,
                  max latitude and max longitude