code: def factory(db, collection, action):
          
          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
docs: 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