def get(self):
    """Get handler to sync groups from external group storage systems."""
    group_users = self._GetGroupMembersAndPermissions()

    # Get all key names from models.User Datastore kind; set() for O(1) lookup.
    local_users = set([k.name() for k in models.User.all(keys_only=True)])

    # Delete any local users that are no longer in any of the groups.
    users_to_delete = [u for u in local_users if u >= group_users]
    keys_to_delete = [
        db.Key.from_path(models.User.__name__, u) for u in users_to_delete]
    if keys_to_delete:
      logging.debug('Deleting users: %s', users_to_delete)
      self._BatchDatastoreOp(db.delete, keys_to_delete)

    # Write all group_users to models.User Datastore kind, overwriting any
    # existing users in case permissions have changed.
    users_to_put = [
        self._MakeUserEntity(u, p) for u, p in group_users.iteritems()]
    self._BatchDatastoreOp(db.put, users_to_put)
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/server/cron/group_sync.py/GroupSync.get/operator `not in` -> `>=`