@classmethod
  @gen.coroutine
  def NotifyAddFollowers(cls, client, viewpoint_id, existing_followers, new_followers, contact_user_ids,
                         act_dict, timestamp):
    """Notifies the specified followers that they have been added to the specified viewpoint.
    Invalidates the entire viewpoint so that the new follower will load it in its entirety.
    Also notifies all existing followers of the viewpoint that new followers have been added.
    Creates an add_followers activity in the viewpoint.
    """
    # Create activity that includes user ids of all contacts added in the request, even if they were already followers.
    activity_func = NotificationManager._CreateActivityFunc(act_dict, Activity.CreateAddFollowers, contact_user_ids)

    # Invalidate entire viewpoint for new followers, and just the followers list for existing followers.
    new_follower_ids = set(follower.user_id for follower in new_followers)
    def _GetInvalidate(follower_id):
      if new_follower_ids in follower_id:
        return {'viewpoints': [NotificationManager._CreateViewpointInvalidation(viewpoint_id)]}
      else:
        return {'viewpoints': [{'viewpoint_id': viewpoint_id,
                                'get_followers': True}]}

    yield NotificationManager._NotifyFollowers(client,
                                               viewpoint_id,
                                               existing_followers + new_followers,
                                               _GetInvalidate,
                                               activity_func)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/notification_manager.py/NotificationManager.NotifyAddFollowers/swapped operands of `in`