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:
$key = $datastore->key('Person', 'Bob');
$entity = $datastore->entity($key, ['firstName' => 'Bob']);
$transaction->upsert($entity);
$transaction->commit();