def get(self):
    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 not in 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)
Create a fake host.
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/server/cron/group_sync.py/GroupSync.get--crossover with--dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/tests/compute/v2/fakes.py/FakeHost.create_one_host