Haversine How to implement the haversine formula in python to calculate the distance in kilometers between 2 points on Earth. Take into account that we are assuming that The Earth is a perfect sphere with a radius of 6371 km.