code: def resolve_rows(rows):
      
      merged_rows = []
      for row in rows:
          overlap = False
          for mrow in merged_rows:
              if any(axis_overlap(ax1, ax2) for ax1 in row
                     for ax2 in mrow):
                  mrow += row
                  overlap = True
                  break
          if not overlap:
              merged_rows.append(row)
      if rows == merged_rows:
          return rows
      else:
          return resolve_rows(merged_rows)
docs: Recursively iterate over lists of axes merging
      them by their vertical overlap leaving a list
      of rows.