IsModelReferenceTo🔗

Type: Transpilable verification function
Check that the target of the model reference matches the expectedType.

Code

return (
    reference.type == ReferenceTypes.ModelReference
    and len(reference.keys) != 0
    and reference.keys[-1].type == expectedType
)