CollectUniqueIdShortsOfVariables🔗

Type: Transpilable verification function
Collect the Referable.idShort's of the variables values.
variables🔗
Operation variables whose ID-shorts we collect
id_short_set🔗
ID-shorts observed so far, extended in place
Return🔗
False if an ID-short has been already observed

Code

if variables is None:
    return True

for variable in variables:
    id_short = variable.value.ID_short
    if id_short is None:
        continue

    if id_short in id_short_set:
        return False

    id_short_set.add(id_short)

return True