code: def distance(p1, p2):
      
      R = 6371
  
      lat1, lon1 = p1
      lat2, lon2 = p2
  
      phi1 = radians(lat1)
      phi2 = radians(lat2)
      delta_lat = radians(lat2 - lat1)
      delta_lon = radians(lon2 - lon1)
  
      a = haversin(delta_lat) + cos(phi1) * cos(phi2) * haversin(delta_lon)
      return 2 * R * atan2(sqrt(a), sqrt(1 - a))
docs: Distance between (lat1, lon1) and (lat2, lon2).