(result)
return result_errors
result is the return value of do_import

    it is important that when changes are made to the return value of do_import
    this function remains backwards compatible,
    i.e. compatible with old return values of do_import,
    because those values are saved directly in the database,
    and we need to be able to process them in the future
result is the return value of do_import
result is the return value of do_import
def normalize_task_status_result_errors(result):
    """
    result is the return value of do_import

    it is important that when changes are made to the return value of do_import
    this function remains backwards compatible,
    i.e. compatible with old return values of do_import,
    because those values are saved directly in the database,
    and we need to be able to process them in the future
    """
    result_errors = []
    for _, columns_to_error_value in result['errors'].items():
        for column_name, error_value in columns_to_error_value.items():
            result_errors.append(TaskStatusResultError(
                title=str(error_value['error']),
                description=str(error_value['description']),
                column=column_name,
                rows=error_value['rows'],
                sample=error_value.get('sample', '')
            ))
    return result_errors
def normalize_task_status_result_errors ( result ) : result_errors = [ ] for _ , columns_to_error_value in result [ 'errors' ] . items ( ) : for column_name , error_value in columns_to_error_value . items ( ) : result_errors . append ( TaskStatusResultError ( title = str ( error_value [ 'error' ] ) , description = str ( error_value [ 'description' ] ) , column = column_name , rows = error_value [ 'rows' ] , sample = error_value . get ( 'sample' , '' ) ) ) return result_errors