I frequently have to determine whether a context is a referenced alembic file or a referenced clarisse project.
The way I have been doing this up till now is to:
a) Check that the item is a context
b) Then check to see if it is a reference
c) Then check the filename attribute to see if it ends in .abc or .project
This seems like it is not too clean and could suffer from edge cases (missing file name in the attribute for example). Is there a better way to do this?