def _update_return_dict(ret, success, data, errors=None, warnings=None):
 errors = ([] if (errors is None) else errors)
 warnings = ([] if (warnings is None) else warnings)
 ret['success'] = success
 ret['data'].update(data)
 ret['errors'] = (ret['errors'] + errors)
 ret['warnings'] = (ret['warnings'] + warnings)
 return ret

def _update_return_dict ( ret , success , data , errors = None , warnings = None ) : errors = ( [ ] if ( errors is None ) else errors ) warnings = ( [ ] if ( warnings is None ) else warnings ) ret [ 'success' ] = success ret [ 'data' ] . update ( data ) ret [ 'errors' ] = ( ret [ 'errors' ] + errors ) ret [ 'warnings' ] = ( ret [ 'warnings' ] + warnings ) return ret
private method updates the return dictionary and returns it .