'Determine which row\'s data we want to keep.'

def row_to_keep(self, correct_course_row, newline_course_row):

    if (newline_course_row.grade > correct_course_row.grade):
        log.info('->    Newline    course    record    grade    %s    is    higher    than    correct    course    record    grade    %s', newline_course_row.grade, correct_course_row.grade)
        return newline_course_row
    elif (correct_course_row.grade > newline_course_row.grade):
        log.info('->    Correct    course    record    grade    %s    is    higher    than    newline    course    record    grade    %s', correct_course_row.grade, newline_course_row.grade)
        return correct_course_row
    if (newline_course_row.modified > correct_course_row.modified):
        log.info('->    Newline    course    record    modified    %s    is    later    than    correct    course    record    modified    %s', newline_course_row.modified, correct_course_row.modified)
        return newline_course_row
    return correct_course_row
