Programmatically checking if an Express Entity already has an Association with another Express Entity, how?

If I wanted to check if an Express Entity already has an Association with another Express Entity, programmatically, how would I go about doing this?

I’m asking because the private package I’m on the tail end of rolling out creates about 29 Express Entities with a lot of complex Associations all over the place, and I need to build out some logic so those Associations happen in a particular order as the Entities are made.

I can’t quite tell how to check if an Association between two Express Entities already exists, let alone what type it is (so I can check if it is configured correctly), programmatically.