code: def distance(p1, p2):
      """Distance between (lat1, lon1) and (lat2, lon2)."""
      R = 6371
  
      lat1, lon1 = p1
      lat2, lon2 = p2
  
      phi1 = radians(lat1)
      phi2 = radians(lat2)
      delta_lat = radians(lat2 - lat1)
      delta_lon = radians(lon2 - lon1)
  
      a = haversin(delta_lat) + cos(phi1) * cos(phi2) * haversin(
          delta_lon
      )
      return 2 * R * atan2(sqrt(a), sqrt(1 - a))
  
file_path: bokeh/examples/models/trail.py
imports: from math import atan2, cos, radians, sin, sqrt
  import numpy
  import scipy.ndimage
  from bokeh.document import Document
  from bokeh.embed import file_html
  from bokeh.models import Column, ColumnDataSource, GMapOptions, GMapPlot, Grid, Label, Line, LinearAxis, PanTool, Patches, Plot, Range1d, ResetTool, WheelZoomTool
  from bokeh.sampledata.mtb import obiszow_mtb_xcm
  from bokeh.util.browser import view
label_desc: Use image node_id 2 for calling a global function with example usage: distance(p1, p2) and returns: unknown