code: def rectcenter(r):
      """ "Return the center of a rectangle <r>."""
      w = r[1][0] - r[0][0]
      h = r[1][1] - r[0][1]
  
      return pt(r[0][0] + w / 2, r[0][1] + h / 2)
  
file_path: pdftabextract/pdftabextract/geom.py
imports: import math
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: rectcenter(r) and returns: pt