docs: def batch_commit(self, *, do_deletes=False):
          '''
          Batch and commit and end of context
          '''
          try:
              yield
          except Exception as exc:
              raise exc
          else:
              for key, value in self.cache.items():
                  if value is not DELETED:
                      self.wrapped_db[key] = value
                  elif do_deletes:
                      self.wrapped_db.pop(key, None)
                  # if do_deletes is False, ignore deletes to underlying db
          finally:
              self.cache = {}