code: def get_text_sparsity(bbox, mentions):
      
      b = bbox[-4:]
      bbox_area = (b[2] - b[0]) * (b[3] - b[1])
      text_area = 0
      for m in mentions:
          text_area += (m.x1 - m.x0) * (m.y1 - m.y0)
      try:
          return 1.0 * text_area / bbox_area
      except ZeroDivisionError:
          return 0.0
docs: computes text area coverage
      :param mentions:
      :return: