def _line_parse(line):
    'Removes line ending characters and returns a tuple (`stripped_line`,\n    `is_terminated`).\n    '
    if (line[(- 2):] == '\r\n'):
        return (line[:(- 2)], True)
    elif (line[(- 1):] in '\r\n'):
        return (line[:(- 1)], True)
    return (line, False)
Removes line ending characters and returns a tuple (`stripped_line`,
`is_terminated`).
def _line_parse(line):
    'Removes line ending characters and returns a tuple (`stripped_line`,\n    `is_terminated`).\n    '
    if (line[(- 2):] == '\r\n'):
        return (line[:(- 2)], True)
    elif (line[(- 1):] in '\r\n'):
        return (line[:(- 1)], True)
    return (line, False)