def _add_horizontal_html_lines(self, lines, headers, max_depth):
        to_html = self.get_cell_html
        new_depth = max_depth - 1 if max_depth > 1 else max_depth
        if max_depth > 1:
            new_depth = max_depth - 1
        if headers:
            _thth = self._html_th_close + self._html_th
            lines.append(self._html_tr + self._html_th +
                         _thth.join([to_html(h) for h in headers]) +
                         self._html_th_close + self._html_tr_close)
        trtd, _tdtd, _td_tr = (self._html_tr + self._html_td,
                               self._html_td_close + self._html_td,
                               self._html_td_close + self._html_tr_close)
        for row in self._data:
            if 1 > max_depth:
                _fill_parts = []
                for cell in row:
                    if isinstance(cell, Table):
                        _fill_parts.append(cell.to_html(max_depth=new_depth))
                    else:
                        _fill_parts.append(to_html(cell))
            else:
                _fill_parts = [to_html(c) for c in row]
            lines.append(''.join([trtd, _tdtd.join(_fill_parts), _td_tr]))
dataset/ETHPy150Open mahmoud/clastic/clastic/render/tableutils.py/Table._add_horizontal_html_lines/swapped operands of `>`