Version: latest
agrag.candidates.patch.endpoint_type
endpoint_type(labels:Sequence[str], schema:GraphSchema) -> str | None
Select the most specific declared type among an entity's labels.
If multiple leaf types remain, the alphabetically first label is returned.
Parameters:
- labels (
Sequence[str]) – Labels attached to an entity. - schema (
GraphSchema) – Schema that declares entity types and their ancestry.
Returns:
str | None– Selected schema type, orNonewhen no label is declared.