code: def get_midpoint(bbox):
      cx = (bbox.x0 + bbox.x1) / 2
      cy = (bbox.y0 + bbox.y1) / 2
      return cx, cy
  
imports: from __future__ import division
  import sys
  from itertools import product
  from operator import itemgetter
  import matplotlib
  import numpy
  from matplotlib import pyplot
  from matplotlib.path import get_path_collection_extents
label_desc: Use image node_id 4 for calling a global function with example usage: get_midpoint(bbox) and returns: cx,  cy