input: Write a python function to calculate the distance between two latitude and longitude points using the Haversine formula.
  assert haversine(36.12, -86.67, 33.94, -118.40) == 2887.2599506071106
  assert haversine(51.50, -0.12, 40.71, -74.00) == 5570.222179737958
  assert haversine(34.05, -118.25, 36.12, -86.67) == 2887.2599506071106
output: import math
  
  def haversine(lat1, lon1, lat2, lon2):
      R = 6371.0  # Radius of the Earth in kilometers
      lat1_rad = math.radians(lat1)
      lon1_rad = math.radians(lon1)
      lat2_rad = math.radians(lat2)
      lon2_rad = math.radians(lon2)
      
      dlat = lat2_rad - lat1_rad
      dlon = lon2_rad - lon1_rad
      
      a = math.sin(dlat / 2)**2 + math.cos(lat1_rad) * math.cos(lat2_rad) * math.sin(dlon / 2)**2
      c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
      
      distance = R * c
      return distance