code: def _print_cline(self, buf, i, icol):
          
          for cl in self.clinebuf:
              if cl[0] == i:
                  buf.write('\\cline{{{cl:d}-{icol:d}}}\n'
                            .format(cl=cl[1], icol=icol))
          # remove entries that have been written to buffer
          self.clinebuf = [x for x in self.clinebuf if x[0] != i]
docs: Print clines after multirow-blocks are finished