def create_association(self, subject=None, predicate=None, object=None, assoc_type=None):
        if not subject or not predicate or not object:
            raise BadRequest("Association must have all elements set")
        if type(subject) is str:
            subject_id = subject
            subject = self.read(subject_id)
        else:
            if "_id" not in subject:
                raise BadRequest("Subject id not available")
            subject_id = subject._id
        st = subject.type_

        if type(object) is str:
            object_id = object
            object = self.read(object_id)
        else:
            if "_id" not in object:
                raise BadRequest("Object id not available")
            object_id = object._id
        ot = object.type_

        # Check that subject and object type are permitted by association definition
        # Note: Need import here, so that import orders are not screwed up
        from pyon.core.registry import getextends
        from pyon.ion.resource import Predicates
        from pyon.core.bootstrap import IonObject

        assoc = dict(type_="Association",
            s=subject_id, st=st,
            p=predicate,
            o=object_id, ot=ot,
            ts=get_ion_ts())
        return self.datastore.create_doc(assoc, create_unique_association_id())
:param callable callback: user's callback, having the signature
dataset/ETHPy150Open ooici/pyon/pyon/ion/resregistry_standalone.py/ResourceRegistryStandalone.create_association--crossover with--dataset/ETHPy150Open pika/pika/pika/adapters/blocking_connection.py/_ReturnedMessageEvt.__init__