'Add number of syncs and last sync to response'

def alter_list_data_to_serialize(self, request, to_be_serialized):

    for bundle in to_be_serialized['objects']:
        all_sessions = SyncSession.objects.filter(client_device__id=bundle.data.get('id'))
        last_sync = ('Never' if (not all_sessions) else all_sessions.order_by('-timestamp')[0].timestamp)
        bundle.data['last_sync'] = last_sync
        bundle.data['total_sync_sessions'] = len(all_sessions)
    return to_be_serialized
