def METHOD_NAME(client, entity, mode, if_match='*'):
    if not if_match or if_match == '*':
        return client.update_entity(entity, mode)
    from azure.core import MatchConditions
    return client.update_entity(entity, mode, etag=if_match, match_condition=MatchConditions.IfNotModified)