@classmethod
  @gen.coroutine
  def NotifyRemoveFollowers(cls, client, viewpoint_id, existing_followers, remove_ids, act_dict):
    """Notifies removed followers that they have been removed from the specified viewpoint.
    Invalidates the viewpoint attributes for those followers so that they will get the REMOVED
    label. Also notifies all existing followers of the viewpoint that they need to reload the
    list of viewpoint followers. Creates a remove_followers activity in the viewpoint.
    """
    # Create activity that includes user ids of all users removed in the request, even if they were not followers.
    activity_func = NotificationManager._CreateActivityFunc(act_dict, Activity.CreateRemoveFollowers, remove_ids)

    # Invalidate viewpoint attributes for removed followers, and the followers list for existing followers.
    remove_id_set = set(remove_ids)
    def _GetInvalidate(follower_id):
      if remove_id_set in follower_id:
        return {'viewpoints': [{'viewpoint_id': viewpoint_id,
                                'get_attributes': True}]}
      else:
        return {'viewpoints': [{'viewpoint_id': viewpoint_id,
                                'get_followers': True}]}

    yield NotificationManager._NotifyFollowers(client,
                                               viewpoint_id,
                                               existing_followers,
                                               _GetInvalidate,
                                               activity_func,
                                               always_notify=True)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/notification_manager.py/NotificationManager.NotifyRemoveFollowers/swapped operands of `in`