def _EnsureUUID(self, item, ec_id):
    if not item.uuid:
      item.uuid = self._GenerateUniqueID(ec_id)
    else:
      self._CheckUniqueUUID(item, include_temporary=True)
Ensures a given object has a valid UUID.
dataset/ETHPy150Open ganeti/ganeti/lib/config/__init__.py/ConfigWriter._EnsureUUID