Working example of retrieving associations with the python API

Finally figured it out - the documentation is truly bad here - but this works.

# assuming I already retrieved a list of companies
from hubspot.crm.associations import BatchInputPublicObjectId
batch_ids = BatchInputPublicObjectId([{'id': c.id} for c in companies] )
associations = api_client.crm.associations.batch_api.read(from_object_type="company", 
 to_object_type="contacts",
 batch_input_public_object_id=batch_ids)