def __track_max_id(self, entity):
    if not self.increment_id:
      return
    if isinstance(entity, datastore.Entity):
      if not entity.key():
        return
    elif not entity.has_key():
      return
    key = entity.key()
    key_id = key.id()
    if not key_id:
      return
    path = tuple(key.to_path()[:-1])
    if self.high_ids.get(path, 0) < key_id:
      self.high_ids[path] = key_id
Check the entity to see it has a numeric ID higher than any seen so far.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/bulkload/bulkloader_config.py/GenericImporter.__track_max_id