def default_patch_view(resource, request):
    try:
        data = request.json_body
    except __HOLE__:
        request.response.status_int = 400
        return {'message': 'No JSON data provided.'}
    resource.validate(data, partial=True)
    resource.update_from_dict(data, replace=False)
    return resource.to_dict()
dataset/ETHPy150Open wichert/rest_toolkit/src/rest_toolkit/views.py/default_patch_view