def _log_changes(ret, changekey, changevalue):
 cl = ret['changes'].get('new', [])
 cl.append({changekey: _object_reducer(changevalue)})
 ret['changes']['new'] = cl
 return ret

def _log_changes ( ret , changekey , changevalue ) : cl = ret [ 'changes' ] . get ( 'new' , [ ] ) cl . append ( { changekey : _object_reducer ( changevalue ) } ) ret [ 'changes' ] [ 'new' ] = cl return ret
for logging create/update/delete operations to aws apigateway .