def _read_record(self, file_to_read, read_buffer):
    if (read_buffer.position > self._buffer_size):
        read_buffer.data = read_buffer.data[read_buffer.position:]
        read_buffer.position = 0
    record_start_position_in_buffer = read_buffer.position
    sep_bounds = self._find_separator_bounds(file_to_read, read_buffer)
    read_buffer.position = (sep_bounds[1] if sep_bounds else len(read_buffer.data))
    if (not sep_bounds):
        return (read_buffer.data[record_start_position_in_buffer:], (- 1))
    if self._strip_trailing_newlines:
        return (read_buffer.data[record_start_position_in_buffer:sep_bounds[0]], (sep_bounds[1] - record_start_position_in_buffer))
    else:
        return (read_buffer.data[record_start_position_in_buffer:sep_bounds[1]], (sep_bounds[1] - record_start_position_in_buffer))
def _read_record(self, file_to_read, read_buffer):
    if (read_buffer.position > self._buffer_size):
        read_buffer.data = read_buffer.data[read_buffer.position:]
        read_buffer.position = 0
    record_start_position_in_buffer = read_buffer.position
    sep_bounds = self._find_separator_bounds(file_to_read, read_buffer)
    read_buffer.position = (sep_bounds[1] if sep_bounds else len(read_buffer.data))
    if (not sep_bounds):
        return (read_buffer.data[record_start_position_in_buffer:], (- 1))
    if self._strip_trailing_newlines:
        return (read_buffer.data[record_start_position_in_buffer:sep_bounds[0]], (sep_bounds[1] - record_start_position_in_buffer))
    else:
        return (read_buffer.data[record_start_position_in_buffer:sep_bounds[1]], (sep_bounds[1] - record_start_position_in_buffer))