'Creates and uploads a CSV for the given headers and rows.'

def _upload(self, context, success_headers, success_rows, error_headers, error_rows):

    date = datetime.now(UTC)
    upload_csv_to_report_store(([success_headers] + success_rows), 'grade_report', context.course_id, date)
    if (len(error_rows) > 0):
        error_rows = ([error_headers] + error_rows)
        upload_csv_to_report_store(error_rows, 'grade_report_err', context.course_id, date)
