input: Write a python function to calculate the great-circle distance between two points on the Earth's surface using the haversine formula.
  assert haversine((36.12, -86.67), (33.94, -118.40)) == 2887.2599506071106
  assert haversine((52.2296756, 21.0122287), (41.8919300, 12.5113300)) == 1315.7673522152576
  assert haversine((34.05, -118.25), (40.71, -74.01)) == 3940.0692199485087
output: import math
  
  def haversine(coord1, coord2):
      R = 6371.0  # Earth radius in kilometers
      lat1, lon1 = coord1
      lat2, lon2 = coord2
      
      phi1, phi2 = math.radians(lat1), math.radians(lat2)
      delta_phi = math.radians(lat2 - lat1)
      delta_lambda = math.radians(lon2 - lon1)
      
      a = math.sin(delta_phi / 2.0)**2 + math.cos(phi1) * math.cos(phi2) * math.sin(delta_lambda / 2.0)**2
      c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
      
      distance = R * c
      return distance