code: def haversine(lon1, lat1, lon2, lat2):
      """
      Distance between geodesic coordinates http://www.movable-type.co.uk/scripts/latlong.html
  
      :param lon1: point 1 latitude
      :param lat1: point 1 longitude
      :param lon2: point 1 latitude
      :param lat2: point 2 longitude
      :return: distance in meters between points 1 and 2
      """
      lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])
      dlon = lon2 - lon1
      dlat = lat2 - lat1
      a = (
          sin(dlat / 2) ** 2
          + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
      )
      c = 2 * asin(sqrt(a))
      m = 6367000 * c
      return m
  
imports: from collections import defaultdict
  import csv
  from datetime import datetime
  import json
  from math import radians, cos, sin, asin, sqrt
  import urllib2
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: haversine(lon1, lat1, lon2, lat2) and returns: m