'Checks if activity is present in this aggregated'

def contains(self, activity):

    if (not isinstance(activity, (Activity, long_t, uuid.UUID))):
        raise ValueError('contains    needs    an    activity    or    long    not    %s', activity)
    activity_id = getattr(activity, 'serialization_id', activity)
    return (activity_id in set([a.serialization_id for a in self.activities]))
