def METHOD_NAME(self):
    """
    Get all data relevant to sync the session.
    Args:
        syncdata (dict): All syncdata values, based on
            the keys given by self._attrs_to_sync.
    """
    return {
        attr: getattr(self, attr) for attr in settings.SESSION_SYNC_ATTRS if hasattr(self, attr)
    }