def process(self, messages: List[Message]) -> List[Message]:
    'Augments the message with intents, entities, and diagnostic data.'
    for message in messages:
        out = self._predict(message)
        if self.component_config[INTENT_CLASSIFICATION]:
            (label, label_ranking) = self._predict_label(out)
            message.set(INTENT, label, add_to_output=True)
            message.set('intent_ranking', label_ranking, add_to_output=True)
        if self.component_config[ENTITY_RECOGNITION]:
            entities = self._predict_entities(out, message)
            message.set(ENTITIES, entities, add_to_output=True)
        if (out and self._execution_context.should_add_diagnostic_data):
            message.add_diagnostic_data(self._execution_context.node_name, out.get(DIAGNOSTIC_DATA))
    return messages
Augments the message with intents, entities, and diagnostic data.
def process(self, messages: List[Message]) -> List[Message]:
    
    for message in messages:
        out = self._predict(message)
        if self.component_config[INTENT_CLASSIFICATION]:
            (label, label_ranking) = self._predict_label(out)
            message.set(INTENT, label, add_to_output=True)
            message.set('intent_ranking', label_ranking, add_to_output=True)
        if self.component_config[ENTITY_RECOGNITION]:
            entities = self._predict_entities(out, message)
            message.set(ENTITIES, entities, add_to_output=True)
        if (out and self._execution_context.should_add_diagnostic_data):
            message.add_diagnostic_data(self._execution_context.node_name, out.get(DIAGNOSTIC_DATA))
    return messages