<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self, key):
 """Adds deletion of the entity with given key to the mutation buffer. If mutation buffer reaches its capacity then this method commit all pending mutations from the buffer and emties it. Args: key: key of the entity which should be deleted """

    self._cur_batch.delete(key)
    self._num_mutations += 1
    if self._num_mutations >= MAX_MUTATIONS_IN_BATCH:
      self.commit()
      self.begin()