def _AllocateId(self, callback, type=None, value=None, traceback=None):
    """Invokes callback with a new id from the sequence; if type, value or
    traceback are not None, raises an exception.
    """
    if (type, value, traceback) != (None, None, None):
      raise type, value, traceback
    assert self._cur_id < self._last_id
    new_id = self._cur_id
    self._cur_id += 1
    callback(new_id)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/id_allocator.py/IdAllocator._AllocateId/original