<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def update(name, profile="splunk", **kwargs):
    '''
    Update a splunk search

    CLI Example:

        splunk_search.update 'my search name' sharing=app
    '''
    client = _get_splunk(profile)
    search = client.saved_searches[name]
    props = _get_splunk_search_props(search)
    updates = kwargs
    update_needed = False
    update_set = dict()
    diffs = []
    for key in sorted(kwargs):
        old_value = props.get(key, None)
        new_value = updates.get(key, None)
        if isinstance(old_value, six.string_types):
            old_value = old_value.strip()
        if isinstance(new_value, six.string_types):
            new_value = new_value.strip()
        if old_value != new_value:
            update_set[key] = new_value
            update_needed = True
            diffs.append("{0}: '{1}' => '{2}'".format(
                key, old_value, new_value
            ))
    if update_needed:
        search.update(**update_set).refresh()
        return update_set, diffs
    return False