def axis_ticklabels_overlap(labels):
 if (not labels):
  return False
 try:
  bboxes = [l.get_window_extent() for l in labels]
  overlaps = [b.count_overlaps(bboxes) for b in bboxes]
  return (max(overlaps) > 1)
 except RuntimeError:
  return False

def axis_ticklabels_overlap ( labels ) : if ( not labels ) : return False try : bboxes = [ l . get_window_extent ( ) for l in labels ] overlaps = [ b . count_overlaps ( bboxes ) for b in bboxes ] return ( max ( overlaps ) > 1 ) except RuntimeError : return False
return a boolean for whether the list of ticklabels have overlaps .