def _wrap_users(users, request):
    """
    Returns a list with the given list of users and/or the currently logged in user, if the list
    contains the magic item SELF.
    """
    result = set()
    for u in users:
        if u is SELF and is_authenticated(request):
            result.add(request.user.get_username())
        else:
            result.add(u)
    return result

    Returns a list with the given list of users and/or the currently logged in user, if the list
    contains the magic item SELF.
    
ws4redis/redis_store.py