input: Write a python function to calculate the great circle distance between two points on the earth using the haversine formula.
  assert round(haversine_distance(36.12, -86.67, 33.94, -118.40), 2) == 2887.26
  assert round(haversine_distance(51.50, -0.12, 40.71, -74.01), 2) == 5570.24
  assert round(haversine_distance(35.68, 139.76, 37.77, -122.42), 2) == 8215.34
output: def haversine_distance(lat1, lon1, lat2, lon2):
      from math import radians, sin, cos, sqrt, atan2
  
      # Convert latitude and longitude from degrees to radians
      lat1, lon1, lat2, lon2 = map(radians, [lat1, lon1, lat2, lon2])
  
      # Haversine formula
      dlat = lat2 - lat1
      dlon = lon2 - lon1
  
      a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
      c = 2 * atan2(sqrt(a), sqrt(1 - a))
  
      # Radius of Earth in kilometers (mean radius)
      R = 6371.01
  
      # Calculate the distance
      distance = R * c
      return distance