class_docstr: No transaction batch to write large number of entities.
  
  Usage:
    client = ...  # instance of CompetitionDatastoreClient
    with NoTransactionBatch(client) as batch:
      batch.put(entity1)
      ...
      batch.put(entityN)
      batch.delete(del_entity1)
      ...
      batch.delete(del_entityM)
  
  It could be also used via CompetitionDatastoreClient.no_transact_batch:
    client = ...  # instance of CompetitionDatastoreClient
    with client.no_transact_batch() as batch:
      batch.put(entity1)
      ...
      batch.put(entityN)
      batch.delete(del_entity1)
      ...
      batch.delete(del_entityM)
  
  Most methods of this class are provided to simulate
  google.cloud.datastore.batch.Batch interface, so they could be used
  interchangeably.
  Practically speaking, this class works by maintaining a buffer of
  pending mutations and committing them as soon as the length of the buffer
  reaches MAX_MUTATIONS_IN_BATCH.
docstr: Adds mutation of the entity to the mutation buffer.
  
  If mutation buffer reaches its capacity then this method commit all pending
  mutations from the buffer and emties it.
  
  Args:
    entity: entity which should be put into the datastore
docstr_tok: ["Adds","mutation","of","the","entity","to","the","mutation","buffer",".","If","mutation","buffer","reaches","its","capacity","then","this","method","commit","all","pending","mutations","from","the","buffer","and","emties","it",".","Args",":","entity",":","entity","which","should","be","put","into","the","datastore"]
code: def put(self, entity):
      """Adds mutation of the entity to the mutation buffer.
  
      If mutation buffer reaches its capacity then this method commit all pending
      mutations from the buffer and emties it.
  
      Args:
        entity: entity which should be put into the datastore
      """
      self._cur_batch.put(entity)
      self._num_mutations += 1
      if self._num_mutations >= MAX_MUTATIONS_IN_BATCH:
          self.commit()
          self.begin()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import math
  import random
  import time
  import traceback
  from google.cloud import datastore
  from google.cloud import storage
  from google.cloud.exceptions import TooManyRequests
label_desc: Use image node_id 5 for calling the NoTransactionBatch obj's underlying member method code with example usage: obj.put(entity) without return types