'Called when we might need to remove user to directory
Args:
room_id (str): room_id that user left or stopped being public that
user_id (str)'

@defer.inlineCallbacks
def _handle_remove_user(self, room_id, user_id):

    logger.debug('Maybe    removing    user    %r', user_id)
    row = (yield self.store.get_user_in_directory(user_id))
    update_user_dir = (row and (row['room_id'] == room_id))
    row = (yield self.store.get_user_in_public_room(user_id))
    update_user_in_public = (row and (row['room_id'] == room_id))
    if (update_user_in_public or update_user_dir):
        rooms = (yield self.store.get_rooms_for_user(user_id))
        for j_room_id in rooms:
            if ((not update_user_in_public) and (not update_user_dir)):
                break
            is_in_room = (yield self.store.is_host_joined(j_room_id, self.server_name))
            if (not is_in_room):
                continue
            if update_user_dir:
                update_user_dir = False
                (yield self.store.update_user_in_user_dir(user_id, j_room_id))
            is_public = (yield self.store.is_room_world_readable_or_publicly_joinable(j_room_id))
            if (update_user_in_public and is_public):
                (yield self.store.update_user_in_public_user_list(user_id, j_room_id))
                update_user_in_public = False
    if update_user_dir:
        (yield self.store.remove_from_user_dir(user_id))
    elif update_user_in_public:
        (yield self.store.remove_from_user_in_public_room(user_id))
    user_tuples = (yield self.store.get_users_in_share_dir_with_room_id(user_id, room_id))
    for (user_id, other_user_id) in user_tuples:
        rooms = (yield self.store.get_rooms_in_common_for_users(user_id, other_user_id))
        if (not rooms):
            (yield self.store.remove_user_who_share_room(user_id, other_user_id))
            continue
        found_public_share = None
        for j_room_id in rooms:
            is_public = (yield self.store.is_room_world_readable_or_publicly_joinable(j_room_id))
            if is_public:
                found_public_share = j_room_id
            else:
                found_public_share = None
                (yield self.store.update_users_who_share_room(room_id, (not is_public), [(user_id, other_user_id)]))
                break
        if found_public_share:
            (yield self.store.update_users_who_share_room(room_id, (not is_public), [(user_id, other_user_id)]))
