'Return the line number at which table data ends.'

def end_line(self, lines):

    last_index = (-1)
    for (i, line) in enumerate(lines):
        if (not isinstance(line, SoupString)):
            raise TypeError('HTML    lines    should    be    of    type    SoupString')
        soup = line.soup
        if (soup.td is not None):
            last_index = i
    if (last_index == (-1)):
        return None
    return (last_index + 1)
