def factory(db, collection, action):
        """
        Instantiate trigger
        :param db: db descriptor
        :param collection: collection to be updated
        :param action: ACTION_BEFORE_DELETE, ACTION_AFTER_DELETE, ACTION_BEFORE_UPSERT, ACTION_AFTER_DELETE
        :return: trigger instance if trigger configured in triggers.json or None
        """
        triggers_cfg = na3x_cfg[NA3X_TRIGGERS]
        if (collection in triggers_cfg) and (action in triggers_cfg[collection]):
            return obj_for_name(triggers_cfg[collection][action])(db, collection)
        else:
            return None
Instantiate trigger
        :param db: db descriptor
        :param collection: collection to be updated
        :param action: ACTION_BEFORE_DELETE, ACTION_AFTER_DELETE, ACTION_BEFORE_UPSERT, ACTION_AFTER_DELETE
        :return: trigger instance if trigger configured in triggers.json or None