No service requests are run when this method is called.
Use {@see \Google\Cloud\Datastore\Transaction::commit()} to commit changes.
Upsert will create a record if one does not already exist, or overwrite
existing record if one already exists.
Example:
$keys = [
$datastore->key('Person', 'Bob'),
$datastore->key('Person', 'John')
];
$entities = [
$datastore->entity($keys[0], ['firstName' => 'Bob']),
$datastore->entity($keys[1], ['firstName' => 'John'])
];
$transaction->upsertBatch($entities);
$transaction->commit();