human
Complete this python program:
def _TestAddFollowers(tester, user_cookie, request_dict):
assistant
#Here is the Python code you requested.

    """Called by the ServiceTester in order to test add_followers
    service API call.
    """
    validator = tester.validator
    (user_id, device_id) = tester.GetIdsFromCookie(user_cookie)
    request_dict = deepcopy(request_dict)
    viewpoint_id = request_dict['viewpoint_id']
    actual_dict = tester.SendRequest('add_followers', user_cookie, request_dict)
    op_dict = tester._DeriveNotificationOpDict(user_id, device_id, request_dict)
    users = validator.ValidateCreateProspectiveUsers(op_dict, request_dict['contacts'])
    added_followers = set()
    for user in users:
        follower_id = user.user_id
        follower = validator.GetModelObject(Follower, DBKey(follower_id, viewpoint_id), must_exist=False)
        if (follower is None):
            added_followers.add(follower_id)
            validator.ValidateFollower(user_id=follower_id, viewpoint_id=viewpoint_id, timestamp=op_dict['op_timestamp'], labels=[Follower.CONTRIBUTE], last_updated=op_dict['op_timestamp'], adding_user_id=user_id, viewed_seq=0)
        elif follower.IsRemoved():
            added_followers.add(follower_id)
            validator.ValidateFollower(user_id=follower_id, viewpoint_id=viewpoint_id, labels=follower.labels.intersection(Follower.PERMISSION_LABELS), last_updated=op_dict['op_timestamp'], adding_user_id=user_id)
    activity_dict = {'name': 'add_followers', 'activity_id': request_dict['activity']['activity_id'], 'timestamp': request_dict['activity']['timestamp'], 'follower_ids': [user.user_id for user in users]}
    def _GetInvalidate(follower_id):
        if (follower_id in added_followers):
            return validator.CreateViewpointInvalidation(viewpoint_id)
        else:
            return {'viewpoints': [{'viewpoint_id': viewpoint_id, 'get_followers': True}]}
    validator.ValidateFollowerNotifications(viewpoint_id, activity_dict, op_dict, _GetInvalidate)
    all_followers = validator.QueryModelObjects(Follower, predicate=(lambda f: (f.viewpoint_id == viewpoint_id)))
    validator.ValidateFriendsInGroup([f.user_id for f in all_followers])
    validator.ValidateViewpointAccounting(viewpoint_id)
   ...