def _cap_to_lines(s, n):
    lines = s.splitlines()
    if (len(lines) <= n):
        return s
    else:
        return '\n'.join((lines[0:n] + ['...']))
def _cap_to_lines(s, n):
    lines = s.splitlines()
    if (len(lines) <= n):
        return s
    else:
        return '\n'.join((lines[0:n] + ['...']))