'Performs finalization actions after the upload completes.
If keys with numeric ids were used on import, this will call AllocateIds
to ensure that autogenerated IDs will not raise exceptions on conflict
with uploaded entities.'

def finalize(self):

    if self.reserve_keys:
        self.reserve_keys(self.keys_to_reserve)
