def server_session_sync(self, serversessions):
        """
        Server wants to save data to the portal, maybe because it's
        about to shut down. We don't overwrite any sessions here, just
        update them in-place and remove any that are out of sync
        (which should normally not be the case)

        Args:
            serversessions (dict): This is a dictionary

                `{sessid:{property:value},...}` describing
                the properties to sync on all sessions.
        """
        to_save = [sessid for sessid in serversessions if sessid in self]
        to_delete = [sessid for sessid in self if sessid not in to_save]
        # save protocols
        for sessid in to_save:
            self[sessid].load_sync_data(serversessions[sessid])
        # disconnect out-of-sync missing protocols
        for sessid in to_delete:
            self.server_disconnect(sessid)
dataset/ETHPy150Open evennia/evennia/evennia/server/portal/portalsessionhandler.py/PortalSessionHandler.server_session_sync/original