'returns the dehydrated version of the current activity'

def get_dehydrated(self):

    if (self.dehydrated is True):
        raise ValueError('already    dehydrated')
    self._activity_ids = []
    for activity in self.activities:
        self._activity_ids.append(activity.serialization_id)
    self.activities = []
    self.dehydrated = True
    return self
