def is_id_slot(self, slot):
    """Test if the slot is for an external identifier."""
    if slot.id not in self.ancestor_type_ids_cache:
      self.ancestor_type_ids_cache[slot.id] = [
          x.id for x in self.ancestor_types(slot)]
    anc_ids = self.ancestor_type_ids_cache[slot.id]
    return IDENTIFIER_TYPE_ID in anc_ids
Test if the slot is for an external identifier.
language/templama/sling2facts.py